From aae4c720238edb45bd45f120811af29a4c7c8c40 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Wed, 16 Oct 2019 11:06:02 +1300 Subject: Avoid warning headers already sent when setting session cache limiter (#14979) * Avoid warning headers already sent when setting session cache limiter * Update bootstrap.php --- core/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/bootstrap.php') diff --git a/core/bootstrap.php b/core/bootstrap.php index 04d161a57b..2e46069641 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -29,7 +29,7 @@ if (!defined('PIWIK_VENDOR_PATH')) { // NOTE: the code above must be PHP 4 compatible require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; -if (session_status() !== PHP_SESSION_ACTIVE) { +if (session_status() !== PHP_SESSION_ACTIVE && !headers_sent()) { session_cache_limiter('nocache'); } -- cgit v1.2.3