diff --git a/src/Cache/Region/FileLockRegion.php b/src/Cache/Region/FileLockRegion.php index 5a9ee67c11e..999d6dba1e5 100644 --- a/src/Cache/Region/FileLockRegion.php +++ b/src/Cache/Region/FileLockRegion.php @@ -156,7 +156,7 @@ public function evictAll(): bool { // The check below is necessary because on some platforms glob returns false // when nothing matched (even though no errors occurred) - $filenames = glob(sprintf('%s/*.%s', $this->directory, self::LOCK_EXTENSION)); + $filenames = glob(sprintf('%s/*.%s', $this->directory, self::LOCK_EXTENSION)) ?: []; if ($filenames !== false) { foreach ($filenames as $filename) {