summaryrefslogtreecommitdiffstats
path: root/lib/private/template.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-12-16 15:04:02 +0100
committerVincent Petry <pvince81@owncloud.com>2013-12-16 15:11:13 +0100
commit2a1d6d310628fbd22b1972442b19ad98d8ff7ad1 (patch)
tree4e3fbdca6ae6ef80ae23e91c788abf8018b42769 /lib/private/template.php
parent77b68505c2164330803ce5d5dcbb9fd07438e18d (diff)
downloadnextcloud-server-2a1d6d310628fbd22b1972442b19ad98d8ff7ad1.tar.gz
nextcloud-server-2a1d6d310628fbd22b1972442b19ad98d8ff7ad1.zip
Do not use L10n when logging exceptions
In some specific situations, the L10N bundle isn't loadable yet (for example when there is an issue with the app_config table). In such case, we still want to be able to log the real exception. This fixes errors that say "OC_L10N_String::__toString must not throw exceptions"
Diffstat (limited to 'lib/private/template.php')
-rw-r--r--lib/private/template.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/template.php b/lib/private/template.php
index 9b2c1211e61..b2c3a20f281 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -292,9 +292,8 @@ class OC_Template extends \OC\Template\Base {
if (!empty($hint)) {
$hint = '<pre>'.$hint.'</pre>';
}
- $l = OC_L10N::get('lib');
while (method_exists($exception, 'previous') && $exception = $exception->previous()) {
- $error_msg .= '<br/>'.$l->t('Caused by:').' ';
+ $error_msg .= '<br/>Caused by:' . ' ';
if ($exception->getCode()) {
$error_msg .= '['.$exception->getCode().'] ';
}