Fix #2219 type error in Redis cache driver

This commit is contained in:
Kijin Sung 2023-12-01 00:02:03 +09:00
parent a36ecab8b4
commit 4373208953

View file

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