Skip to content

Commit 3119f59

Browse files
committed
PHP 7.4 compatibility fixes
1 parent 127240a commit 3119f59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Caching/Storages/FileStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private function verify(array $meta): bool
114114
if (!empty($meta[self::META_ITEMS])) {
115115
foreach ($meta[self::META_ITEMS] as $depFile => $time) {
116116
$m = $this->readMetaAndLock($depFile, LOCK_SH);
117-
if ($m[self::META_TIME] !== $time || ($m && !$this->verify($m))) {
117+
if (($m[self::META_TIME] ?? null) !== $time || ($m && !$this->verify($m))) {
118118
break 2;
119119
}
120120
}
@@ -160,7 +160,7 @@ public function write(string $key, $data, array $dp): void
160160
foreach ($dp[Cache::ITEMS] as $item) {
161161
$depFile = $this->getCacheFile($item);
162162
$m = $this->readMetaAndLock($depFile, LOCK_SH);
163-
$meta[self::META_ITEMS][$depFile] = $m[self::META_TIME]; // may be null
163+
$meta[self::META_ITEMS][$depFile] = $m[self::META_TIME] ?? null;
164164
unset($m);
165165
}
166166
}

0 commit comments

Comments
 (0)