From 49b5a3826543965b586c0cccb6c168f8afd59de4 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Wed, 18 Dec 2013 16:02:02 +0800 Subject: [PATCH] MDL-43235 behat: Remove notice about undeclared var --- lib/behat/classes/behat_command.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/behat/classes/behat_command.php b/lib/behat/classes/behat_command.php index 20762ae1efe..bda2b3547c2 100644 --- a/lib/behat/classes/behat_command.php +++ b/lib/behat/classes/behat_command.php @@ -148,7 +148,9 @@ class behat_command { } // Checking behat dataroot existence otherwise echo about admin/tool/behat/cli/init.php. - $CFG->behat_dataroot = realpath($CFG->behat_dataroot); + if (!empty($CFG->behat_dataroot)) { + $CFG->behat_dataroot = realpath($CFG->behat_dataroot); + } if (empty($CFG->behat_dataroot) || !is_dir($CFG->behat_dataroot) || !is_writable($CFG->behat_dataroot)) { self::output_msg(get_string('runclitool', 'tool_behat', 'php admin/tool/behat/cli/init.php')); return BEHAT_EXITCODE_CONFIG;