From 128755464954ffc959c132795b6c949e93d22f79 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 3 Apr 2017 13:22:53 +0700 Subject: [PATCH] return early after set error_reporting and display_errors ini set for exclude-php-errors settings --- src/HeroTrait.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HeroTrait.php b/src/HeroTrait.php index 1f888e64..e971644b 100644 --- a/src/HeroTrait.php +++ b/src/HeroTrait.php @@ -55,12 +55,12 @@ public function phpErrorHandler($errorType, $errorMessage, $errorFile, $errorLin return; } - if (! $this->errorHeroModuleConfig['display-settings']['display_errors'] || - in_array($errorType, $this->errorHeroModuleConfig['display-settings']['exclude-php-errors']) - ) { + if (! $this->errorHeroModuleConfig['display-settings']['display_errors']) { error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 0); + } + if (in_array($errorType, $this->errorHeroModuleConfig['display-settings']['exclude-php-errors'])) { return; }