nrk/predis-async

Consumer unsubscribe triggers Catchable fatal error

xzander opened this issue · 0 comments

<?php
require __DIR__ . '/vendor/autoload.php';
ini_set('display_errors', 'on');
error_reporting(E_ALL);
function pubsub($message, $client)
{
}
$loop = \React\EventLoop\Factory::create();
$client = new Predis\Async\Client('tcp://127.0.0.1:6379', $loop);
$consumer = $this->redis->pubSubLoop('test', 'pubsub');
$consumer->unsubscribe('test');

This code triggers catchable fatal error on PHP 5.6:

PHP Catchable fatal error:  Argument 2 passed to Predis\Async\Client::pubSubLoop() must be callable, null given, called in redis_test.php on line 10 and defined in /media/sf_share/nevesta.info/vendor/predis/predis-async/src/Client.php on line 307