8000 Merge pull request #1845 from phpredis/issue-php8test · phpredis/phpredis@7e5191f · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e5191f

Browse files
authored
Merge pull request #1845 from phpredis/issue-php8test
fix test suite for PHP 8
2 parents d3780b4 + 1784879 commit 7e5191f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
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
}

tests/startSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
ini_set('redis.session.lock_expire', $lock_expire);
2323
ini_set('session.gc_maxlifetime', $sessionLifetime);
2424

25-
if (isset($argv[8])) {
25+
if (isset($argv[10])) {
2626
ini_set('redis.session.locking_enabled', $argv[10]);
2727
}
2828

29-
if (isset($argv[9])) {
29+
if (isset($argv[11])) {
3030
ini_set('redis.session.lock_wait_time', $argv[11]);
3131
}
3232

0 commit comments

Comments
 (0)
0