From 17e675a7fcbaa35b7af0a44dce30057bb70bea89 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 10 Mar 2015 21:42:11 +0800 Subject: [PATCH] MDL-39752 behat: Return proper behat dir if config set --- lib/behat/classes/behat_command.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/behat/classes/behat_command.php b/lib/behat/classes/behat_command.php index ce6c744a731..7ec8a744052 100644 --- a/lib/behat/classes/behat_command.php +++ b/lib/behat/classes/behat_command.php @@ -50,6 +50,11 @@ class behat_command { public static function get_behat_dir($runprocess = 0) { global $CFG; + // If not set then return empty string. + if (!isset($CFG->behat_dataroot)) { + return ""; + } + if (empty($runprocess)) { $behatdir = $CFG->behat_dataroot . '/behat'; } else if (isset($CFG->behat_parallel_run[$runprocess - 1]['behat_dataroot'])) {