\n";
$data .= "
[$errorType] $errstr
$errfile:$errline\n
\n
\n
\n";
// Get a backtrace, filtering out debug method calls
$data .= SS_Backtrace::backtrace(true, false, array(
'SS_LogErrorEmailFormatter->format',
'SS_LogEmailWriter->_write'
));
// 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";
}
$data .= "
\n";
$relfile = Director::makeRelative($errfile);
if($relfile && $relfile[0] == '/') $relfile = substr($relfile, 1);
$host = @$_SERVER['HTTP_HOST'];
$uri = @$_SERVER['REQUEST_URI'];
$subject = "[$errorType] in $relfile:{$errline} (http://{$host}{$uri})";
return array(
'subject' => $subject,
'data' => $data
);
}
}