Closed oyo775881 closed 6 years ago
环境:
PHP7.2+ThinkPHP5.0.14
代码: $jpush = \think\Config::get('jpush'); $client = new \JPush\Client($jpush['app_key'], $jpush['app_secret']); $client->push()->setPlatform('all')->addAllAudience()->setNotificationAlert(‘123456’)->send();
报错: count(): Parameter must be an array or an object that implements Countable
请提供 server sdk 的版本与报错的具体到 server sdk 中的哪一行
另外单看报错信息的,如果真有这个问题的话,那也应该是所有的 php 版本都会产生的错误
SDK是用的最新的,直接Composer安装的,报错到第几行也不太清楚了,代码跟踪过去显示是count这个函数的问题,因为已经换了信鸽推送,这边不能给您提供截图了。
环境:
PHP7.2+ThinkPHP5.0.14
代码: $jpush = \think\Config::get('jpush'); $client = new \JPush\Client($jpush['app_key'], $jpush['app_secret']); $client->push()->setPlatform('all')->addAllAudience()->setNotificationAlert(‘123456’)->send();
报错: count(): Parameter must be an array or an object that implements Countable