改名
This commit is contained in:
@@ -38,17 +38,13 @@ class OnRequest extends Callback
|
|||||||
try {
|
try {
|
||||||
register_shutdown_function(function () use ($response) {
|
register_shutdown_function(function () use ($response) {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
switch ($error['type'] ?? null) {
|
if (!isset($error['type'])) {
|
||||||
case E_ERROR :
|
return;
|
||||||
case E_PARSE :
|
}
|
||||||
case E_CORE_ERROR :
|
$types = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR];
|
||||||
case E_COMPILE_ERROR :
|
if (in_array($error['type'], $types)) {
|
||||||
// log or send:
|
|
||||||
// error_log($message);
|
|
||||||
// $server->send($fd, $error['message']);
|
|
||||||
$response->status(500);
|
$response->status(500);
|
||||||
$response->end($error['message']);
|
$response->end($error['message']);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/** @var HRequest $sRequest */
|
/** @var HRequest $sRequest */
|
||||||
|
|||||||
Reference in New Issue
Block a user