mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 21:28:40 +00:00
maybe fixing type bug
This commit is contained in:
parent
0eb659ce54
commit
14af04f027
|
|
@ -306,10 +306,11 @@ class RedisCache extends ConnectionAbstract
|
||||||
*/
|
*/
|
||||||
private function reverseValue(int $type, $raw, int $start)
|
private function reverseValue(int $type, $raw, int $start)
|
||||||
{
|
{
|
||||||
|
if ($type === \is_int($raw) || $type === \is_float($raw)) {
|
||||||
|
return $raw;
|
||||||
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case \is_int($raw):
|
|
||||||
case \is_float($raw):
|
|
||||||
return $raw;
|
|
||||||
case CacheValueType::_BOOL:
|
case CacheValueType::_BOOL:
|
||||||
return (bool) \substr($raw, $start + 1);
|
return (bool) \substr($raw, $start + 1);
|
||||||
case CacheValueType::_STRING:
|
case CacheValueType::_STRING:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user