Skip to content

Commit

Permalink
Option to disable all errors when testing mail templates
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Oct 21, 2022
1 parent 7f4a94b commit 2432429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pagic/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function gatherData($data)
protected function evaluatePath($path, $data)
{
if ($silenceNotice = config('system.suppressTemplateRuntimeNotice')) {
$errorLevel = error_reporting(E_ALL & ~E_NOTICE);
$errorLevel = error_reporting(0);
}

$obLevel = ob_get_level();
Expand All @@ -120,7 +120,7 @@ protected function evaluatePath($path, $data)
try {
include $path;
}
catch (Exception|Throwable $e) {
catch (Exception | Throwable $e) {
$this->handleException($e, $obLevel);
}

Expand Down

0 comments on commit 2432429

Please sign in to comment.