From 2a1d6d310628fbd22b1972442b19ad98d8ff7ad1 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 16 Dec 2013 15:04:02 +0100 Subject: 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" --- lib/public/util.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/public/util.php') diff --git a/lib/public/util.php b/lib/public/util.php index 1d76fd1e1f7..8e85f9afc3f 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -103,9 +103,8 @@ class Util { } // include cause - $l = \OC_L10N::get('lib'); while (method_exists($ex, 'getPrevious') && $ex = $ex->getPrevious()) { - $message .= ' - '.$l->t('Caused by:').' '; + $message .= ' - Caused by:' . ' '; $message .= $ex->getMessage(); if ($ex->getCode()) { $message .= '[' . $ex->getCode() . '] '; -- cgit v1.2.3