Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Update PoolHelper.php

Fix typo

* Fix unit test

* Method \Swoole\Coroutine::call_user_func_array() has been removed in Swoole 4.0
  • Loading branch information
huangzhhui authored Jul 21, 2018
1 parent ee373da commit 668b1f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/src/Helper/PhpHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ public static function call($cb, array $args = [])
list($obj, $mhd) = $cb;
$ret = \is_object($obj) ? $obj->$mhd(...$args) : $obj::$mhd(...$args);
} else {
$ret = \Swoole\Coroutine::call_user_func_array($cb, $args);
if (SWOOLE_VERSION >= '4.0') {
$ret = call_user_func_array($cb, $args);
} else {
$ret = \Swoole\Coroutine::call_user_func_array($cb, $args);
}
}

return $ret;
Expand Down

0 comments on commit 668b1f9

Please sign in to comment.