From 065222e518df9083975362cee8fd74177984fc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ms=C2=B7xl?= Date: Thu, 8 Oct 2020 03:37:44 +0800 Subject: [PATCH] 3 --- .gitignore | 34 ++++++++++++++++++++++++++++++++++ System/Error/ErrorHandler.php | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..efca283f --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# Created by .ignore support plugin (hsz.mobi) +### Yii template +assets/* +!assets/.gitignore +protected/runtime/* +!protected/runtime/.gitignore +protected/data/*.db +themes/classic/views/ + +### Example user template template +### Example user template + +# IntelliJ project files +.idea +*.iml +out +gen + +composer.lock + +*.log +commands/result +config/setting.php +tests/ +vendor/ +runtime/ + +*.xml +*.lock + +oot +d + +composer.lock diff --git a/System/Error/ErrorHandler.php b/System/Error/ErrorHandler.php index 89423655..c56f4e22 100644 --- a/System/Error/ErrorHandler.php +++ b/System/Error/ErrorHandler.php @@ -52,7 +52,7 @@ class ErrorHandler extends Component implements ErrorInterface public function shutdown() { $lastError = error_get_last(); - if ($lastError['type'] !== E_ERROR) { + if (empty($lastError) || $lastError['type'] !== E_ERROR) { return; }