html, body, table {font-family: sans-serif; font-size: 12px;}'; $data .= "
\n"; $data .= "

[$errorType] "; $data .= nl2br(htmlspecialchars($errstr))."
$errfile:$errline\n
\n
\n

\n"; // Render the provided backtrace $data .= SS_Backtrace::get_rendered_backtrace($errcontext); // Compile extra data $blacklist = array('message', 'timestamp', 'priority', 'priorityName'); $extras = array_diff_key($event, array_combine($blacklist, $blacklist)); if($extras) { $data .= "

Details

\n"; $data .= "\n"; foreach($extras as $k => $v) { if(is_array($v)) $v = var_export($v, true); $data .= sprintf( "\n", $k, $v); } $data .= "
%s
%s
\n"; } $data .= "
\n"; $relfile = Director::makeRelative($errfile); if($relfile && $relfile[0] == '/') $relfile = substr($relfile, 1); $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null; $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null; $subject = "[$errorType] in $relfile:{$errline} (http://{$host}{$uri})"; return array( 'subject' => $subject, 'data' => $data ); } }