Skip to content

Commit

Permalink
fix 1 test for PHP 8, use call_user_func when no arg
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Sep 11, 2020
1 parent d3780b4 commit f4a30cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/RedisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6102,9 +6102,15 @@ public function testInvalidAuthArgs() {

foreach ($arr_args as $arr_arg) {
try {
@call_user_func_array([$obj_new, 'auth'], $arr_arg);
if (is_array($arr_arg)) {
@call_user_func_array([$obj_new, 'auth'], $arr_arg);
} else {
call_user_func([$obj_new, 'auth']);
}
} catch (Exception $ex) {
unset($ex); /* Suppress intellisense warning */
} catch (ArgumentCountError $ex) {
unset($ex); /* Suppress intellisense warning */
}
}
}
Expand Down

0 comments on commit f4a30cb

Please sign in to comment.