Skip to content

Commit

Permalink
Skip generic Twig exception in errorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
dvz committed Dec 18, 2023
1 parent 1203015 commit 3007d44
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions inc/class_error.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ function exception_callback(Throwable $exception): void
}
else
{
if (
str_starts_with(
$exception->getMessage(),
'An exception has been thrown during the rendering of a template',
) &&
$exception->getPrevious()
) {
$exception = $exception->getPrevious();
}

$this->error(
MYBB_UNCAUGHT_EXCEPTION,
$exception->getMessage(),
Expand Down

0 comments on commit 3007d44

Please sign in to comment.