...
|
...
|
@@ -318,26 +318,32 @@ class App { |
|
|
$app = self::instance();
|
|
|
|
|
|
// 记录日志
|
|
|
if($last_error = error_get_last()){
|
|
|
$last_error = error_get_last();
|
|
|
if($last_error){
|
|
|
logs($last_error);
|
|
|
|
|
|
if($last_error == E_ERROR){
|
|
|
$data['error_message'] = $last_error['message'];
|
|
|
$data['status'] = 502;
|
|
|
|
|
|
if($app->debug){
|
|
|
$data['debug'] = $last_error;
|
|
|
}
|
|
|
|
|
|
self::echo($data,502);
|
|
|
|
|
|
}else{
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
if($app->getError()){
|
|
|
logs(
|
|
|
is_string($app->getError()) ? $app->getError() : implode(PHP_EOL,$app->getError())
|
|
|
);
|
|
|
logs($app->getError());
|
|
|
}
|
|
|
|
|
|
self::echo($app->data);
|
|
|
}
|
|
|
|
|
|
|
|
|
// 日志记录
|
|
|
Log::getInstance()->write();
|
...
|
...
|
|