Permalink
Browse files

Merge pull request #78 from elazar/fix/template-render-exceptions

Fixed Template->render() exception handling
  • Loading branch information...
2 parents 207bf83 + e686b8d commit 2d8569e9f140a70d6a05db38006926f7547cb802 @reinink reinink committed Jul 9, 2015
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Template/Template.php
@@ -132,9 +132,11 @@ public function render(array $data = array())
return $content;
} catch (LogicException $e) {
- ob_end_clean();
+ if (ob_get_length() > 0) {
+ ob_end_clean();
+ }
- throw new LogicException($e->getMessage());
+ throw $e;
}
}

0 comments on commit 2d8569e

Please sign in to comment.