Skip to content

Commit

Permalink
Update trim before unserialize to prevent warnings in PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ve3 committed Nov 3, 2023
1 parent 037c3fd commit 29f5f4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Drivers/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ public function get($key, $default = null)
if (isset($match_data_type[1])) {
$data_type = $match_data_type[1];
}
if (isset($match_data[1])) {
$data = unserialize($match_data[1]);
if (isset($match_data[1]) && is_scalar($match_data[1])) {
$data = unserialize(trim($match_data[1]));
}
unset($match_data, $match_data_type, $match_lifetime);
}
Expand Down

0 comments on commit 29f5f4c

Please sign in to comment.