Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clean up the output buffer on exception

  • Loading branch information...
commit e3e825063a22c8e29e0661cd854afb88252411c9 1 parent 381cb43
@m6w6 authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/http/Controller/Observer/View.php
View
11 lib/http/Controller/Observer/View.php
@@ -40,9 +40,14 @@ function update(\SplSubject $ctl) {
$file = $this->getViewScript($ctl);
if (file_exists($file)) {
- ob_start($ctl->getResponse());
- static::render($file, $ctl->getPayload()->getArrayCopy());
- ob_end_flush();
+ try {
+ ob_start($ctl->getResponse());
+ static::render($file, $ctl->getPayload()->getArrayCopy());
+ ob_end_flush();
+ } catch (\Exception $e) {
+ ob_end_flush();
+ throw $e;
+ }
}
}

0 comments on commit e3e8250

Please sign in to comment.
Something went wrong with that request. Please try again.