mirror of
https://github.com/filp/whoops.git
synced 2026-09-03 14:08:36 +00:00
Merge pull request #345 from ExplodingCabbage/master
Fix handling of Content-Type headers
This commit is contained in:
@@ -258,8 +258,7 @@ class PlainTextHandler extends Handler
|
||||
return Handler::DONE;
|
||||
}
|
||||
|
||||
if (class_exists('\Whoops\Util\Misc')
|
||||
&& \Whoops\Util\Misc::canSendHeaders()) {
|
||||
if (\Whoops\Util\Misc::canSendHeaders()) {
|
||||
header('Content-Type: text/plain');
|
||||
}
|
||||
|
||||
|
||||
@@ -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