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