Skip to content

Commit 2d8569e

Browse files
committed
Merge pull request #78 from elazar/fix/template-render-exceptions
Fixed Template->render() exception handling
2 parents 207bf83 + e686b8d commit 2d8569e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Template/Template.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ public function render(array $data = array())
132132

133133
return $content;
134134
} catch (LogicException $e) {
135-
ob_end_clean();
135+
if (ob_get_length() > 0) {
136+
ob_end_clean();
137+
}
136138

137-
throw new LogicException($e->getMessage());
139+
throw $e;
138140
}
139141
}
140142

0 commit comments

Comments
 (0)