Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit b0f159d

Browse files
author
aft-christophe
authored
PHP 7 - Catching Error - Bug fix
The php renderer was only catching Exception - PHP 7 changed how error are reported http://php.net/manual/en/language.errors.php7.php
1 parent 4d9954c commit b0f159d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Renderer/PhpRenderer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,10 @@ public function render($nameOrModel, $values = null)
504504
ob_start();
505505
$includeReturn = include $this->__file;
506506
$this->__content = ob_get_clean();
507-
} catch (\Exception $ex) {
507+
} catch (\Throwable $ex) {
508+
ob_end_clean();
509+
throw $ex;
510+
} catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced
508511
ob_end_clean();
509512
throw $ex;
510513
}

0 commit comments

Comments
 (0)