diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-22 20:46:37 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-08-23 01:25:20 +0400 |
commit | 5f06c87400ec4995a63f260ffa8140e14f0ba735 (patch) | |
tree | 5cd0c914740ac028c249cc64fded3b0bd012ef80 /core/Profiler.php | |
parent | 6f0d131ed3e3b1a1271250005ad82aace8ec00ca (diff) |
Refs #5995, do not access piwik URL for non-main runs when running xhprof since it initializes the config object.
Diffstat (limited to 'core/Profiler.php')
-rw-r--r-- | core/Profiler.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Profiler.php b/core/Profiler.php index c4f3c6e7d4..486b6ce7da 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -240,11 +240,12 @@ class Profiler xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); - if($mainRun) { + $baseUrlStored = ""; + if ($mainRun) { self::setProfilingRunIds(array()); - } - $baseUrlStored = SettingsPiwik::getPiwikUrl(); + $baseUrlStored = SettingsPiwik::getPiwikUrl(); + } register_shutdown_function(function () use($profilerNamespace, $mainRun, $baseUrlStored) { $xhprofData = xhprof_disable(); |