swoft-cloud / swoft

🚀 PHP Microservice Full Coroutine Framework
https://swoft.org
Apache License 2.0
5.58k stars 786 forks source link

Redis::pipeline 返回值类型错误 #1415

Closed Ederth closed 3 years ago

Ederth commented 3 years ago
Q A
Bug report? yes
Swoft version 2.0.10
Swoole version 4.5.9
PHP version 7.3.25
Runtime environment Docker

Describe the bug Redis::pipeline 报返回值类型错误,有的时候返回 bool,有的时候返回 int Return value of Swoft\Redis\Connection\Connection::multi() must be of the type array, bool returned

Expected behavior pipline 正常返回数组

Screenshots image

Details

return Redis::pipeline(function (\Redis $redis) use ($deviceNums) {
    foreach ($deviceNums as $deviceNum) {
        $redis->get($this->onlineAtDao->getKey($deviceNum));
    }
});
Ederth commented 3 years ago

docker中redis扩展版本是5.x 扩展版本换成4.x目前没有再出现这个问题