From 8ba27e27c3639bce8be5b41ac64851e9814a78c0 Mon Sep 17 00:00:00 2001 From: mattab Date: Thu, 19 Nov 2015 13:07:46 +1300 Subject: Use XHProf extension if it is enabled (do not require to build the xhprof via composer) --- core/Profiler.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'core/Profiler.php') 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"); -- cgit v1.2.3