public function report() {
$this->doLog();
- $httpMessage = HttpStatus::getMessage( $this->httpCode );
-
- header( "Status: {$this->httpCode} {$httpMessage}", true, $this->httpCode );
+ HttpStatus::header( $this->httpCode );
header( 'Content-type: text/html; charset=utf-8' );
print $this->getHTML();
$content = $content->text();
}
- $context = array(
+ $context = [
'file' => $this->getFile(),
'line' => $this->getLine(),
'http_code' => $this->httpCode,
- );
+ ];
$logMsg = "$content ({http_code}) from {file}:{line}";
if ( $this->content instanceof Message ) {
$contentHtml = $this->content->escaped();
} else {
- $contentHtml = htmlspecialchars( $this->content );
+ $contentHtml = nl2br( htmlspecialchars( $this->content ) );
}
return "<!DOCTYPE html>\n" .