]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix 'Undefined variable: message' in OCP\Util::logException
authorThomas Tanghus <thomas@tanghus.net>
Thu, 20 Mar 2014 09:23:40 +0000 (10:23 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Thu, 20 Mar 2014 09:23:40 +0000 (10:23 +0100)
lib/public/util.php

index 585c5d226341785dea867c33fb91e0e0310f521f..a159bf1423cd1741dcdd5ef03994ce2fd1e2a429 100644 (file)
@@ -89,14 +89,11 @@ class Util {
         */
        public static function logException( $app, \Exception $ex ) {
                $class = get_class($ex);
-               if ($class !== 'Exception') {
-                       $message = $class . ': ';
-               }
-               $message .= $ex->getMessage();
+               $message = $class . ': ' . $ex->getMessage();
                if ($ex->getCode()) {
                        $message .= ' [' . $ex->getCode() . ']';
                }
-               \OCP\Util::writeLog($app, 'Exception: ' . $message, \OCP\Util::FATAL);
+               \OCP\Util::writeLog($app, $message, \OCP\Util::FATAL);
                if (defined('DEBUG') and DEBUG) {
                        // also log stack trace
                        $stack = explode("\n", $ex->getTraceAsString());