Skip to content

Commit 8ce0682

Browse files
author
Ethan Hann
committed
Don't attempt to deserialize number values
1 parent c940512 commit 8ce0682

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Ehann/Cache/RedisStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function serialize($value)
6060
*/
6161
protected function unserialize($value)
6262
{
63-
if (is_string($value)) {
63+
if (!is_numeric($value) && is_string($value)) {
6464
$isValueCompressed = bin2hex(mb_strcut($value, 0, 1)) === self::COMPRESSION_ENABLED_FILE_HEADER;
6565
return unserialize($isValueCompressed ? gzuncompress($value) : $value);
6666
}

0 commit comments

Comments
 (0)