2525spl_autoload_register (function ($ class ) {
2626 if (0 === stripos ($ class , 'Wechat \\' )) {
2727 $ filename = dirname (__DIR__ ) . DIRECTORY_SEPARATOR . str_replace ('\\' , DIRECTORY_SEPARATOR , $ class ) . '.php ' ;
28- file_exists ($ filename ) && require ( $ filename) ;
28+ if ( file_exists ($ filename )) require $ filename ;
2929 }
3030});
3131
@@ -76,7 +76,7 @@ static public function register($event, $method, $class = null)
7676 * @param array $config SDK配置(token,appid,appsecret,encodingaeskey,mch_id,partnerkey,ssl_cer,ssl_key,qrc_img)
7777 * @return WechatCard|WechatCustom|WechatDevice|WechatExtends|WechatMedia|WechatMenu|WechatOauth|WechatPay|WechatPoi|WechatReceive|WechatScript|WechatService|WechatUser
7878 */
79- static public function & get_instance ($ type , $ config = array ())
79+ static public function get_instance ($ type , $ config = array ())
8080 {
8181 return self ::get ($ type , $ config );
8282 }
@@ -87,7 +87,7 @@ static public function & get_instance($type, $config = array())
8787 * @param array $config SDK配置(token,appid,appsecret,encodingaeskey,mch_id,partnerkey,ssl_cer,ssl_key,qrc_img)
8888 * @return WechatCard|WechatCustom|WechatDevice|WechatExtends|WechatMedia|WechatMenu|WechatOauth|WechatPay|WechatPoi|WechatReceive|WechatScript|WechatService|WechatUser
8989 */
90- static public function & get ($ type , $ config = array ())
90+ static public function get ($ type , $ config = array ())
9191 {
9292 $ index = md5 (strtolower ($ type ) . md5 (json_encode (self ::$ config )));
9393 if (!isset (self ::$ cache [$ index ])) {
0 commit comments