Skip to content

Commit 30915e6

Browse files
Merge pull request #165 from zamu87/master
Fix PHP 8.1 warning with sentinel
2 parents 068a4e1 + e75ea1e commit 30915e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cm/Cache/Backend/Redis.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function __construct($options = array())
172172
$sentinelClientOptions = isset($options['sentinel']) && is_array($options['sentinel'])
173173
? $this->getClientOptions($options['sentinel'] + $options)
174174
: $this->_clientOptions;
175-
$servers = preg_split('/\s*,\s*/', trim($options['server']), NULL, PREG_SPLIT_NO_EMPTY);
175+
$servers = preg_split('/\s*,\s*/', trim($options['server']), -1, PREG_SPLIT_NO_EMPTY);
176176
$sentinel = NULL;
177177
$exception = NULL;
178178
for ($i = 0; $i <= $sentinelClientOptions->connectRetries; $i++) // Try each sentinel in round-robin fashion
@@ -210,7 +210,7 @@ public function __construct($options = array())
210210

211211
$this->_redis = $redisMaster;
212212
break 2;
213-
} catch (Exception $e) {
213+
} catch (\Exception $e) {
214214
unset($sentinelClient);
215215
$exception = $e;
216216
}

0 commit comments

Comments
 (0)