Skip to content

Commit

Permalink
Merge pull request phacility#55 from skilld-labs/env-output-dir
Browse files Browse the repository at this point in the history
Allow to override xhprof.output_dir via env
  • Loading branch information
longxinH authored Mar 30, 2021
2 parents 1af920b + 8f07580 commit 518a7d0
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 518a7d0

Please sign in to comment.