mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
为键名使用强制类型转换string
使用数字作为键名时set()成功保存 但是停止框架后再启动框架数据落地恢复时报错类型不符合 Fatal error: Uncaught TypeError: Swoole\Table::set(): Argument #1 ($key) must be of type string, int given in zhamao/vendor/zhamao/framework/src/ZM/Store/LightCache.php:81
This commit is contained in:
parent
29d7d07c8e
commit
5b1c771a2d
@ -75,7 +75,7 @@ class LightCache
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$result = self::$kv_table->set($k, [
|
||||
$result = self::$kv_table->set((string)$k, [
|
||||
'value' => $value,
|
||||
'expire' => $v['expire'],
|
||||
'data_type' => $data_type,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user