mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
add bool type support for LightCache (#325)
This commit is contained in:
@@ -188,7 +188,10 @@ class LightCache
|
|||||||
$data_type = '';
|
$data_type = '';
|
||||||
} elseif (is_int($value)) {
|
} elseif (is_int($value)) {
|
||||||
$data_type = 'int';
|
$data_type = 'int';
|
||||||
} else {
|
} elseif (is_bool($value)) {
|
||||||
|
$data_type = 'bool';
|
||||||
|
$value = json_encode($value);
|
||||||
|
} else {
|
||||||
throw new LightCacheException('E00048', 'Only can set string, array and int');
|
throw new LightCacheException('E00048', 'Only can set string, array and int');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user