Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyleK <kylekatarnls@gmail.com>2014-09-14 16:18:01 +0400
committerKyleK <kylekatarnls@gmail.com>2014-09-14 16:18:01 +0400
commita9fb8c7b89def45a3754fb383ce3e76488ed7156 (patch)
treef5d0e22bc8698294367c356db2ee1cc1e12eef48 /core/Common.php
parent37599df8123f7f2678b55c42b139d619c0a4d3b9 (diff)
Replace header() with Common::sendHeader() when possible
Diffstat (limited to 'core/Common.php')
-rw-r--r--core/Common.php7
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);
}
}