diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-14 15:38:47 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-14 15:38:47 +0200 |
commit | 0cff70bb9005307fe480cf08685bb77cd249b8c7 (patch) | |
tree | 318aa65d0cad956b17c70c280b48db3a10c764e5 /lib/private | |
parent | 068e73cc47f4a35ce0b4374ad1b69df4b6a3265b (diff) | |
parent | 12f1adb7bbdd1bfcab0df93a998909d85f650454 (diff) | |
download | nextcloud-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.php | 9 |
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 |