From 4a20c996569f9e145e706dff77b89a8fcf5818cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Aug 2019 02:46:09 +0200 Subject: [PATCH] FIX Content send before header warning --- htdocs/website/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index b240c376f9e69..36065bf8ba03c 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -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'); @@ -1605,6 +1607,7 @@ else { setEventMessages($object->error, $object->errors, 'errors'); + $action = ''; } }