Skip to content

Commit 4453347

Browse files
committed
FileStorage: removed some @ (experimental)
1 parent f484fab commit 4453347

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Caching/Storages/FileStorage.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,10 @@ protected function readMetaAndLock($file, $lock)
326326
if ($head && strlen($head) === self::META_HEADER_LEN) {
327327
$size = (int) substr($head, -6);
328328
$meta = stream_get_contents($handle, $size, self::META_HEADER_LEN);
329-
$meta = @unserialize($meta); // intentionally @
330-
if (is_array($meta)) {
331-
$meta[self::FILE] = $file;
332-
$meta[self::HANDLE] = $handle;
333-
return $meta;
334-
}
329+
$meta = unserialize($meta);
330+
$meta[self::FILE] = $file;
331+
$meta[self::HANDLE] = $handle;
332+
return $meta;
335333
}
336334

337335
flock($handle, LOCK_UN);
@@ -354,7 +352,7 @@ protected function readData($meta)
354352
if (empty($meta[self::META_SERIALIZED])) {
355353
return $data;
356354
} else {
357-
return @unserialize($data); // intentionally @
355+
return unserialize($data);
358356
}
359357
}
360358

0 commit comments

Comments
 (0)