Skip to content

Commit

Permalink
move isDisplayErrorsEnabled() to BaseExceptionHandler class for reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 9, 2024
1 parent ededc90 commit 5dab62d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 12 additions & 0 deletions system/Debug/BaseExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,16 @@ protected function render(Throwable $exception, int $statusCode, $viewFile = nul
return ob_get_clean();
})();
}

/**
* Whether the PHP display_errors setting is enabled.
*/
protected function isDisplayErrorsEnabled(): bool
{
return in_array(
strtolower(ini_get('display_errors')),
['1', 'true', 'on', 'yes'],
true
);
}
}
12 changes: 0 additions & 12 deletions system/Debug/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,4 @@ protected function determineView(

return $view;
}

/**
* Whether the PHP display_errors setting is enabled.
*/
private function isDisplayErrorsEnabled(): bool
{
return in_array(
strtolower(ini_get('display_errors')),
['1', 'true', 'on', 'yes'],
true
);
}
}

0 comments on commit 5dab62d

Please sign in to comment.