mirror of
https://github.com/filp/whoops.git
synced 2026-09-16 12:46:19 +00:00
Set Content-Type: text/html in PrettyPageHandler
This will make the pretty HTML pages work properly even if the user already spat out a different Content-Type header prior to their error.
This commit is contained in:
@@ -185,6 +185,10 @@ class PrettyPageHandler extends Handler
|
||||
}, $this->getDataTables());
|
||||
$vars["tables"] = array_merge($extraTables, $vars["tables"]);
|
||||
|
||||
if (\Whoops\Util\Misc::canSendHeaders()) {
|
||||
header('Content-Type: text/html');
|
||||
}
|
||||
|
||||
$helper->setVariables($vars);
|
||||
$helper->render($templateFile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user