All pastes #2053560 Raw Edit

Miscellany

public text v1 · immutable
#2053560 ·published 2011-05-03 18:29 UTC
rendered paste body
    /**
     * Error Handler will convert error into log message, and then call the original error handler
     *
     * @link http://www.php.net/manual/en/function.set-error-handler.php Custom error handler
     * @param int $errno
     * @param string $errstr
     * @param string $errfile
     * @param int $errline
-    * @param array $errcontext
     * @return boolean
     */
-   public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext)
+   public function errorHandler($errno, $errstr, $errfile, $errline)
    {
        $errorLevel = error_reporting();

        if ($errorLevel && $errno) {
            if (isset($this->_errorHandlerMap[$errno])) {
                $priority = $this->_errorHandlerMap[$errno];
            } else {
                $priority = Zend_Log::INFO;
            }
-           $this->log($errstr, $priority, array('errno'=>$errno, 'file'=>$errfile, 'line'=>$errline, 'context'=>$errcontext));
+           $this->log($errstr, $priority, array('errno' => $errno, 'file' => $errfile, 'line' => $errline));
        }

        if ($this->_origErrorHandler !== null) {
-           return call_user_func($this->_origErrorHandler, $errno, $errstr, $errfile, $errline, $errcontext);
+           return call_user_func($this->_origErrorHandler, $errno, $errstr, $errfile, $errline);
        }
        return false;
    }