Skip to content

Commit f4a30cb

Browse files
committed
fix 1 test for PHP 8, use call_user_func when no arg
1 parent d3780b4 commit f4a30cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/RedisTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6102,9 +6102,15 @@ public function testInvalidAuthArgs() {
61026102

61036103
foreach ($arr_args as $arr_arg) {
61046104
try {
6105-
@call_user_func_array([$obj_new, 'auth'], $arr_arg);
6105+
if (is_array($arr_arg)) {
6106+
@call_user_func_array([$obj_new, 'auth'], $arr_arg);
6107+
} else {
6108+
call_user_func([$obj_new, 'auth']);
6109+
}
61066110
} catch (Exception $ex) {
61076111
unset($ex); /* Suppress intellisense warning */
6112+
} catch (ArgumentCountError $ex) {
6113+
unset($ex); /* Suppress intellisense warning */
61086114
}
61096115
}
61106116
}

0 commit comments

Comments
 (0)