Fix type conversion error in Redis cache driver (43732089 regression)

This commit is contained in:
Kijin Sung 2024-01-05 01:04:55 +09:00
parent 43e3672c4e
commit 30dbe29de7

View file

@ -203,7 +203,7 @@ class Redis implements \Rhymix\Framework\Drivers\CacheInterface
{
try
{
$value = (is_int($value) || ctype_digit((string)$value)) ? $value : serialize($value);
$value = (is_scalar($value) && ctype_digit((string)$value)) ? $value : serialize($value);
return $this->_conn->setex($key, $ttl, $value) ? true : false;
}
catch (\RedisException $e)