Browse Source

Pass port 0 as integer to Redis::connect() with unix socket (#8749)

The second parameter to Redis::connect() is an int parameter. Passing
null for it will trigger a PHP deprecation notice with PHP 8.1.

The Redis::connect() documentation shows that a 0 is used for the port
parameter in the examples with unix sockets where parameters beyond the
second parameter are set.
pull/8789/head
Michael Stilkerich 3 years ago
committed by Aleksander Machniak
parent
commit
473eec4a8a
  1. 2
      program/lib/Roundcube/cache/redis.php

2
program/lib/Roundcube/cache/redis.php

@ -110,7 +110,7 @@ class rcube_cache_redis extends rcube_cache
if (substr($redis_host, 0, 7) === 'unix://') {
$host = substr($port, 2);
$port = null;
$port = 0;
}
else {
// set default values if not set

Loading…
Cancel
Save