// Log the error via logMessage() if requested.
if ($log) {
- self::logMessage($error, 'EMERG');
+ try {
+ self::logMessage($error, 'EMERG');
+ } catch (Exception $e) {}
}
if ($cli) {
static public function logDeprecated($errno, $errstr, $errfile, $errline,
$errcontext)
{
- self::logMessage(new ErrorException($errstr, 0, $errno, $errfile, $errline), 'DEBUG');
+ if (class_exists('Horde_Log')) {
+ try {
+ self::logMessage(new ErrorException($errstr, 0, $errno, $errfile, $errline), 'DEBUG');
+ } catch (Exception $e) {}
+ }
}
/**
try {
$GLOBALS['registry']->pushApp($app, array('check_perms' => ($args['authentication'] != 'none'), 'logintasks' => !$args['nologintasks']));
- /* Catch and log E_DEPRECATED errors. */
- if (defined('E_DEPRECATED')) {
- set_error_handler(array('Horde', 'logDeprecated'), E_DEPRECATED);
- }
if ($args['admin'] && !Horde_Auth::isAdmin()) {
throw new Horde_Exception('Not an admin');
}
* output this unless an admin. */
set_exception_handler(array('Horde', 'fatal'));
+/* Catch and log E_DEPRECATED errors. */
+if (defined('E_DEPRECATED')) {
+ set_error_handler(array('Horde', 'logDeprecated'), E_DEPRECATED);
+}