This commit is contained in:
2022-10-11 15:15:04 +08:00
parent 3dd5311430
commit 6898e544f7
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -110,12 +110,12 @@ class Context extends BaseContext
/** /**
* @param null $coroutineId * @param null $coroutineId
* @return mixed * @return Coroutine\Context|array
*/ */
public static function getAllContext($coroutineId = null): mixed public static function getAllContext($coroutineId = null): Coroutine\Context|array
{ {
if (Coroutine::getCid() === -1) { if (Coroutine::getCid() === -1) {
return Coroutine::getContext($coroutineId) ?? []; return Coroutine::getContext((int)$coroutineId) ?? [];
} else { } else {
return static::$_contents ?? []; return static::$_contents ?? [];
} }
+1
View File
@@ -58,6 +58,7 @@ class Main extends BaseMain
$error->registerShutdownHandler(Config::get('error.shutdown', [])); $error->registerShutdownHandler(Config::get('error.shutdown', []));
$error->registerExceptionHandler(Config::get('error.exception', [])); $error->registerExceptionHandler(Config::get('error.exception', []));
$error->registerErrorHandler(Config::get('error.error', [])); $error->registerErrorHandler(Config::get('error.error', []));
$this->id = Config::get('id', uniqid('id.'));
} }
/** /**