diff --git a/lib/xhprof/xhprof_moodle.php b/lib/xhprof/xhprof_moodle.php index 293ffacaad1..9a4f850d2d0 100644 --- a/lib/xhprof/xhprof_moodle.php +++ b/lib/xhprof/xhprof_moodle.php @@ -865,7 +865,7 @@ class moodle_xhprofrun implements iXHProfRuns { $DB->insert_record('profiling', $rec); - if (PHPUNIT_TEST) { + if (PHPUNIT_TEST && !PHPUNIT_UTIL) { // Calculate export variables. $tempdir = 'profiling'; make_temp_directory($tempdir);