diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-11-19 03:07:46 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-11-19 03:07:46 +0300 |
commit | 8ba27e27c3639bce8be5b41ac64851e9814a78c0 (patch) | |
tree | 4e0783481af065c1de99a412bed03277862e134e /core | |
parent | 82a5dc136bb655792db154944c519051fe1e5bca (diff) |
Use XHProf extension if it is enabled (do not require to build the xhprof via composer)
Diffstat (limited to 'core')
-rw-r--r-- | core/Profiler.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/core/Profiler.php b/core/Profiler.php index c1b0875fa6..12c1e46ff6 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -209,13 +209,9 @@ class Profiler return; } - $xhProfPath = PIWIK_INCLUDE_PATH . '/vendor/facebook/xhprof/extension/modules/xhprof.so'; - if (!file_exists($xhProfPath)) { - throw new Exception("Cannot find xhprof, run 'composer install --dev' and build the extension."); - } - if (!function_exists('xhprof_enable')) { - throw new Exception("Cannot find xhprof_enable, make sure to add 'extension=$xhProfPath' to your php.ini."); + $xhProfPath = PIWIK_INCLUDE_PATH . '/vendor/facebook/xhprof/extension/modules/xhprof.so'; + throw new Exception("Cannot find xhprof_enable, make sure to 1) install xhprof: run 'composer install --dev' and build the extension, and 2) add 'extension=$xhProfPath' to your php.ini."); } $outputDir = ini_get("xhprof.output_dir"); |