10000 [Cache] do not pass null to strlen() · symfony/cache@49e771f · GitHub
[go: up one dir, main page]

Skip to content

Commit 49e771f

Browse files
committed
[Cache] do not pass null to strlen()
1 parent 7cdabf9 commit 49e771f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ protected function doClear($namespace)
373373
{
374374
if ($this->redis instanceof \Predis\ClientInterface) {
375375
$prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : '';
376-
$prefixLen = \strlen($prefix);
376+
$prefixLen = \strlen($prefix ?? '');
377377
}
378378

379379
$cleared = true;

0 commit comments

Comments
 (0)
0