Skip to content

Commit

Permalink
Update HandlerErrors.php
Browse files Browse the repository at this point in the history
  • Loading branch information
juancristobalgd1 authored Aug 4, 2024
1 parent 003e82d commit 40a21ff
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/HandlerErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ function handlerErrors($errno, $errstr, $errfile, $errline)
if (error_reporting() === 0)
return false;

if (php_sapi_name() === 'cli') {
if (php_sapi_name() === 'cli')
handleCliError($errno, $errstr, $errfile, $errline);
}

handleWebError($errno, $errstr, $errfile, $errline);
}
Expand All @@ -44,13 +43,11 @@ function handlerException(Throwable $e)

$log = Config::get('app.initLogReportings');

if ($log === true) {
if ($log === true)
error_log((string) theme($e), 3, getDirectory());
}

if (php_sapi_name() === 'cli') {
if (php_sapi_name() === 'cli')
handleCliException($e);
}

handleWebException($e);
}
Expand Down Expand Up @@ -94,9 +91,9 @@ function handleCliError($errno, $errstr, $errfile, $errline)

$log = Config::get('app.initLogReportings');

if ($log === true) {
if ($log === true)
error_log((string) theme($e), 3, getDirectory());
}

exit;
}

Expand Down

0 comments on commit 40a21ff

Please sign in to comment.