leancloud / php-sdk

LeanCloud PHP SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

用户反馈 PHP SDK 的一个报错

SXiaoXu opened this issue · comments

commented

来自社区用户: https://forum.leancloud.cn/t/php-sdk-bug/18474

\LeanCloud\Client 类里的 useRegion()函数,下面这行代码:
AppRouter::getInstance($this->appId)->setRegion($region);

会导致 “Using $this when not in object context” 的错误

修复方式,改为:
AppRouter::getInstance(self::$appId)->setRegion($region);

已在 #176 中修复,但还未发布