From: Michael M Slusarz Date: Thu, 13 Jan 2011 18:12:15 +0000 (-0700) Subject: Fix error handler for '@'-prefixed calls. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=42fe1c5412e71cdaf45e3e4b375750b9a886ae7a;p=horde.git Fix error handler for '@'-prefixed calls. Fixes, e.g., detecting bad character conversion of a string. --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 0b600156a..cec702b70 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -167,6 +167,12 @@ HTML; static public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) { + // Calls prefixed with '@'. + if (error_reporting() == 0) { + // Must return false to populate $php_errormsg (as of PHP 5.2). + return false; + } + if (class_exists('Horde_Log')) { try { self::logMessage(new ErrorException('PHP ERROR: ' . $errstr, 0, $errno, $errfile, $errline), 'DEBUG');