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

Commit 146fff4

Browse files
committed
Merge branch 'hotfix/125'
Close #125
2 parents 92e5533 + c0d23f1 commit 146fff4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ All notable changes to this project will be documented in this file, in reverse
2424
`HelperPluginManager` such that it no longer injects a translator in a helper
2525
if one is already present.
2626

27+
- [#125](https://github.com/zendframework/zend-view/pull/125) provides an update
28+
to the `PhpRenderer:render()` method such that it will now catch not only
29+
`Exception` instances, but also PHP 7 `Throwable` instances, and properly
30+
cleanup the output buffers when it does.
31+
2732
## 2.9.0 - 2017-03-21
2833

2934
### Added

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)