Skip to content

Commit

Permalink
Update lib.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mawann committed May 19, 2024
1 parent f49d120 commit 0a739cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cache/stores/redis/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ protected function new_redis(array $configuration): Redis|RedisCluster|null {
} else {
// We only need the first record for the single redis.
list($server, $port) = explode(':', $trimmedservers[0]);
// If $port is null, an error message will be displayed:
// PHP Deprecated: Redis::connect(): Passing null to parameter #2 ($port) of type int is deprecated
// To solve this problem, change null to 0.
if ($port == null) $port = 0;
$redis = new Redis();
$redis->connect($server, $port, 1, null, 100, 1, $opts);
if (!empty($password)) {
Expand Down

0 comments on commit 0a739cb

Please sign in to comment.