diff options
author | KyleK <kylekatarnls@gmail.com> | 2014-09-14 16:18:01 +0400 |
---|---|---|
committer | KyleK <kylekatarnls@gmail.com> | 2014-09-14 16:18:01 +0400 |
commit | a9fb8c7b89def45a3754fb383ce3e76488ed7156 (patch) | |
tree | f5d0e22bc8698294367c356db2ee1cc1e12eef48 /core/Common.php | |
parent | 37599df8123f7f2678b55c42b139d619c0a4d3b9 (diff) |
Replace header() with Common::sendHeader() when possible
Diffstat (limited to 'core/Common.php')
-rw-r--r-- | core/Common.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/Common.php b/core/Common.php index 5d5c35c764..c345c1d17d 100644 --- a/core/Common.php +++ b/core/Common.php @@ -1053,12 +1053,7 @@ class Common public static function sendHeader($header, $replace = true) { // don't send header in CLI mode - if(Common::isPhpCliMode()) { - return; - } - if (isset($GLOBALS['PIWIK_TRACKER_LOCAL_TRACKING']) && $GLOBALS['PIWIK_TRACKER_LOCAL_TRACKING']) { - @header($header, $replace); - } else { + if(!Common::isPhpCliMode() and !headers_sent()) { header($header, $replace); } } |