This commit is contained in:
2021-12-17 04:26:54 +08:00
parent 4b3c2234af
commit b4ce762cf3
+3 -2
View File
@@ -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;
}