From e3837281fa5226c5df0dc973997f18082ac3ca94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 24 Apr 2023 14:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Context.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Context.php b/Context.php index 28fcd73..ce51830 100644 --- a/Context.php +++ b/Context.php @@ -39,7 +39,7 @@ class Context */ public static function inCoroutine(): bool { - return Coroutine::getCid() > -1; + return class_exists(Coroutine::class) && Coroutine::getCid() > -1; } }