Skip to content

Commit

Permalink
Allow to override xhprof.output_dir via env
Browse files Browse the repository at this point in the history
  • Loading branch information
andypost committed Mar 27, 2021
1 parent 1af920b commit 8f07580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xhprof_lib/utils/xhprof_runs.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct($dir = null) {
// if specified, else we default to the directory
// in which the error_log file resides.

if (empty($dir)) {
if (empty($dir) && !($dir = getenv('XHPROF_OUTPUT_DIR'))) {
$dir = ini_get("xhprof.output_dir");
if (empty($dir)) {

Expand All @@ -101,7 +101,7 @@ public function __construct($dir = null) {
"Trying {$dir} as default. You can either pass the " .
"directory location as an argument to the constructor ".
"for XHProfRuns_Default() or set xhprof.output_dir ".
"ini param.");
"ini param, or set XHPROF_OUTPUT_DIR environment variable.");
}
}
$this->dir = $dir;
Expand Down

0 comments on commit 8f07580

Please sign in to comment.