From 5f3875b3c4b9c4414c78715c8e329d68742ca2ec Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 26 Apr 2017 19:15:17 +0200 Subject: [PATCH] Allow to specify 'xhprof.output_dir' without xhprof available If the xhprof extension is not installed, `ini_get()` doesn't work but `get_cfg_var()` still return the value: ``` php > print_r(ini_get('xhprof.output_dir')); php > print_r(get_cfg_var('xhprof.output_dir')); /test/ ``` This allow to use the UI with `tideways` for instance or on a separate server. --- xhprof_lib/utils/xhprof_runs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xhprof_lib/utils/xhprof_runs.php b/xhprof_lib/utils/xhprof_runs.php index 2a22a5dc..9cb68218 100644 --- a/xhprof_lib/utils/xhprof_runs.php +++ b/xhprof_lib/utils/xhprof_runs.php @@ -92,7 +92,7 @@ public function __construct($dir = null) { // in which the error_log file resides. if (empty($dir)) { - $dir = ini_get("xhprof.output_dir"); + $dir = get_cfg_var("xhprof.output_dir"); if (empty($dir)) { $dir = sys_get_temp_dir();