From b4ce762cf3eb70982af72817dca5496767955af6 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 17 Dec 2021 04:26:54 +0800 Subject: [PATCH] 1 --- kiri-engine/Context.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kiri-engine/Context.php b/kiri-engine/Context.php index a722661e..ed7d01b2 100644 --- a/kiri-engine/Context.php +++ b/kiri-engine/Context.php @@ -186,8 +186,9 @@ class Context extends BaseContext if (!isset(Coroutine::getContext($coroutineId)[$id])) { return false; } - if ($key !== null) { - return isset((Coroutine::getContext($coroutineId)[$id] ?? [])[$key]); + $value = Coroutine::getContext($coroutineId)[$id]; + if ($key !== null && is_array($value)) { + return isset($value[$key]); } return true; }