summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-14 15:38:47 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-14 15:38:47 +0200
commit0cff70bb9005307fe480cf08685bb77cd249b8c7 (patch)
tree318aa65d0cad956b17c70c280b48db3a10c764e5 /lib/private
parent068e73cc47f4a35ce0b4374ad1b69df4b6a3265b (diff)
parent12f1adb7bbdd1bfcab0df93a998909d85f650454 (diff)
downloadnextcloud-server-0cff70bb9005307fe480cf08685bb77cd249b8c7.tar.gz
nextcloud-server-0cff70bb9005307fe480cf08685bb77cd249b8c7.zip
Merge pull request #23991 from owncloud/handle-exceptions-in-templates
Properly handle exception within templates
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/template/base.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/template/base.php b/lib/private/template/base.php
index 32dcdb98e86..cfe629b5fbf 100644
--- a/lib/private/template/base.php
+++ b/lib/private/template/base.php
@@ -168,8 +168,13 @@ class Base {
// Include
ob_start();
- include $file;
- $data = ob_get_contents();
+ try {
+ include $file;
+ $data = ob_get_contents();
+ } catch (\Exception $e) {
+ @ob_end_clean();
+ throw $e;
+ }
@ob_end_clean();
// Return data