diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-12-08 13:23:58 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-12-08 13:23:58 +0400 |
commit | 23f62923fa0b11f9f0c6d530e0dc1cbc5d691e11 (patch) | |
tree | 62565b3244ae46e7af3c575fa597aa3ee9934924 /core | |
parent | 6f945465fe40021d579bc2b4b8876468da69b062 (diff) |
Minor messages
Diffstat (limited to 'core')
-rw-r--r-- | core/Profiler.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Profiler.php b/core/Profiler.php index d4141f472c..0bf0ac966d 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -204,6 +204,9 @@ class Profiler return; } + if(!is_writable(ini_get("xhprof.output_dir"))) { + throw new \Exception("The profiler output dir '" .ini_get("xhprof.output_dir"). "' should exist and be writable."); + } require_once $path; require_once PIWIK_INCLUDE_PATH . '/tests/lib/xhprof-0.9.4/xhprof_lib/utils/xhprof_lib.php'; @@ -230,6 +233,9 @@ class Profiler $xhprofRuns = new \XHProfRuns_Default(); $runId = $xhprofRuns->save_run($xhprofData, $profilerNamespace); + if(empty($runId)) { + die('could not write profiler run'); + } $runs = self::getProfilingRunIds(); $runs[] = $runId; // $weights = array_fill(0, count($runs), 1); |