From: Andrew Dolgov Date: Mon, 13 May 2013 09:32:51 +0000 (+0400) Subject: errorhandler: check for Logger class existing X-Git-Tag: 1.7.9~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=15d52d51528be7301148d7739240cb1317c80847;p=tt-rss.git errorhandler: check for Logger class existing --- diff --git a/include/errorhandler.php b/include/errorhandler.php index 9acef235..52431c2d 100644 --- a/include/errorhandler.php +++ b/include/errorhandler.php @@ -6,7 +6,8 @@ function ttrss_error_handler($errno, $errstr, $file, $line, $context) { $file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1); - return Logger::get()->log_error($errno, $errstr, $file, $line, $context); + if (class_exists("Logger")) + return Logger::get()->log_error($errno, $errstr, $file, $line, $context); } function ttrss_fatal_handler() { @@ -26,7 +27,8 @@ function ttrss_fatal_handler() { $file = substr(str_replace(dirname(dirname(__FILE__)), "", $file), 1); - return Logger::get()->log_error($errno, $errstr, $file, $line, $context); + if (class_exists("Logger")) + return Logger::get()->log_error($errno, $errstr, $file, $line, $context); } return false;