Skip to content

Commit

Permalink
Merge pull request #205
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
leonardosahon authored Nov 24, 2024
2 parents 6fe4856 + e1adba7 commit 11ed9f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Core/CoreException.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@ private function show_exception($opt = []): ?array

SQL::new()->__rollback_on_error();

if(LayConfig::get_mode() === LayMode::HTTP && $this->throw_500) {
$throw_500 = $this->throw_500 and LayConfig::get_mode() === LayMode::HTTP;


if($throw_500) {
self::$HAS_500 = true;
LayFn::header("HTTP/1.1 500 Internal Server Error");
}
Expand Down Expand Up @@ -529,7 +532,7 @@ class_alias(get_class($anon_class), $exception_class);
return $act;

if($act['display_error'] && $act['echo_error']) {
if(LayConfig::get_mode() === LayMode::HTTP && $this->throw_500) {
if($throw_500) {
self::$HAS_500 = true;
LayFn::header("HTTP/1.1 500 Internal Server Error");
}
Expand Down

0 comments on commit 11ed9f4

Please sign in to comment.