GatewayClient使用Gateway::getUidListByGroup报错
490626721 opened this issue · comments
在框架中通过GatewayClient获取群组内uid数组时GatewayWorker报错
框架报错:
Invalid argument supplied for foreach()
GatewayWorker报错:
Exception: gateway inner pack err cmd=25 in C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\gateway-worker-for-win\src\Gateway.php:797
Stack trace:
#0 [internal function]: GatewayWorker\Gateway->onWorkerMessage(Object(Workerman\Connection\TcpConnection), Array)
#1 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\workerman-for-win\Connection\TcpConnection.php(629): call_user_func(Array, Object(Workerman\Connection\TcpConnection), Array)
#2 [internal function]: Workerman\Connection\TcpConnection->baseRead(Resource id #49)
#3 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\workerman-for-win\Events\Select.php(286): call_user_func_array(Array, Array)
#4 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\workerman-for-win\Worker.php(856): Workerman\Events\Select->loop()
#5 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\gateway-worker-for-win\src\Gateway.php(279): Workerman\Worker->run()
#6 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\workerman-for-win\Worker.php(473): GatewayWorker\Gateway->run()
#7 C:\Users\GLJSHY\Desktop\GatewayWorker\vendor\workerman\workerman-for-win\Worker.php(382): Workerman\Worker::runAllWorkers()
#8 C:\Users\GLJSHY\Desktop\GatewayWorker\Applications\Chat\start_gateway.php(63): Workerman\Worker::runAll()
#9 {main}
process C:\Users\GLJSHY\Desktop\GatewayWorker\Applications\Chat\start_gateway.php terminated and try to restart
使用Gateway::getAllGroupIdList(void)出现相同报错
已找到问题,阅读文档不细心,GatewayWorker版本过低所致