update to 2.2.1 version

fix a compatibility bug
This commit is contained in:
jerry 2021-01-29 21:36:14 +08:00
parent 484ddf9dfa
commit 8a985620f9

View File

@ -15,7 +15,7 @@ class WorkerCache
public static $transfer = [];
public static function get($key) {
$config = self::$config ?? ZMConfig::get("global", "worker_cache");
$config = self::$config ?? ZMConfig::get("global", "worker_cache") ?? ["worker" => 0];
if ($config["worker"] === server()->worker_id) {
return self::$store[$key] ?? null;
} else {