next($record); } $errno = $message->errno & error_reporting(); // problem when using error_reporting with the @ silent fail operator // it gives an errno 0, and in this case the objective is to NOT display anything on the screen! // is there any other case where the errno is zero at this point? // TODO: (@mnapoli) If `@` is used then the error handler will return, so I guess this step is redundant and useless... if ($errno == 0) { $message = false; return $message; } Common::sendHeader('Content-Type: text/html; charset=utf-8'); $html = ''; $html .= "\n
There is an error. Please report the message (Piwik " . (class_exists('Piwik\Version') ? Version::VERSION : '') . ") and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

"; $html .= Error::getErrNoString($message->errno); $html .= ":
{$message->errstr} in {$message->errfile}"; $html .= " on line {$message->errline}\n"; $html .= "

Backtrace -->

\n"; $html .= str_replace("\n", "
\n", $message->backtrace); $html .= "

"; $html .= "\n

"; $record['message'] = $html; return $record; } }