Skip to content

Commit

Permalink
FIX Content send before header warning
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 14, 2019
1 parent 6de2118 commit 4a20c99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/website/index.php
Expand Up @@ -970,8 +970,10 @@
$csscontent.= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n";
$csscontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
$csscontent.= "ob_start();\n";
$csscontent.= "if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ \n";
$csscontent.= "header('Cache-Control: max-age=3600, public, must-revalidate');\n";
$csscontent.= "header('Content-type: text/css');\n";
$csscontent.= "}\n";
$csscontent.= "// END PHP ?>\n";

$csscontent.= GETPOST('WEBSITE_CSS_INLINE', 'none');
Expand Down Expand Up @@ -1605,6 +1607,7 @@
else
{
setEventMessages($object->error, $object->errors, 'errors');
$action = '';
}
}

Expand Down

0 comments on commit 4a20c99

Please sign in to comment.