From c962a3de73f0180e215481f10d8a5a6395ac8e55 Mon Sep 17 00:00:00 2001 From: Evgeny Nikitenko Date: Sun, 16 Apr 2017 21:23:15 +0300 Subject: [PATCH] Try to create directory for XHProf runs if it doesn't exist --- xhprof_lib/utils/xhprof_runs.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xhprof_lib/utils/xhprof_runs.php b/xhprof_lib/utils/xhprof_runs.php index 2a22a5dc..6dc831e9 100644 --- a/xhprof_lib/utils/xhprof_runs.php +++ b/xhprof_lib/utils/xhprof_runs.php @@ -104,6 +104,11 @@ public function __construct($dir = null) { "ini param."); } } + + if (!is_dir($dir)) { + mkdir($dir, 0700, true); + } + $this->dir = $dir; }