1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

Prevent headers in CLI mode.

This commit is contained in:
Cameron
2021-01-16 10:02:52 -08:00
parent 8f4b3429dc
commit 692b8c8538
6 changed files with 24 additions and 11 deletions

View File

@@ -441,9 +441,11 @@ unset($In_e107_Footer);
// Clean session shutdown
e107::getSession()->shutdown(); // moved from the top of footer_default.php to fix https://github.com/e107inc/e107/issues/1446 (session closing before page was complete)
// Shutdown
$e107->destruct();
$e107_Clean_Exit=true; // For registered shutdown function -- let it know all is well!
if(!e107::isCli())
{
e107::getSession()->shutdown(); // moved from the top of footer_default.php to fix https://github.com/e107inc/e107/issues/1446 (session closing before page was complete)
// Shutdown
$e107->destruct();
$e107_Clean_Exit=true; // For registered shutdown function -- let it know all is well!
}

View File

@@ -89,8 +89,10 @@ $js_body_onload = array(); // Legacy array of code to load with page.
//if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml"))
// header("Content-type: application/xhtml+xml; charset=utf-8", TRUE);
//else
header("Content-type: text/html; charset=utf-8", TRUE);
if(!e107::isCli())
{
header("Content-type: text/html; charset=utf-8", true);
}
// NEW - HTML5 default
// TODO - more precise controlo over page header depending on the HTML5 mode
if(!defined("XHTML4"))