summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2014-03-20 10:23:40 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-25 18:07:07 +0100
commitf464620a65ca362a82a4cb1bf47ebff258db23df (patch)
treebb11aa0398da34b837c1f68d628fc54618b7e603 /lib/public
parent2d639b83ab839c8f9256bd411417926d109fc5cd (diff)
downloadnextcloud-server-f464620a65ca362a82a4cb1bf47ebff258db23df.tar.gz
nextcloud-server-f464620a65ca362a82a4cb1bf47ebff258db23df.zip
Fix 'Undefined variable: message' in OCP\Util::logException
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/util.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index e893a76d811..695fe6bdd4e 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -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());