diff --git a/src/ZM/Event/EventHandler.php b/src/ZM/Event/EventHandler.php index eca25c95..58402efa 100644 --- a/src/ZM/Event/EventHandler.php +++ b/src/ZM/Event/EventHandler.php @@ -196,7 +196,8 @@ class EventHandler Console::warning("API 激活事件异常!"); return; } - $content = ctx()->copy(); + if (ctx() === null) $content = []; + else $content = ctx()->copy(); go(function () use ($action, $reply, $connection, $content) { set_coroutine_params($content); context()->setCache("action", $action);