From 920d7ffaddf725d688e4f48f157f972c17b75ba6 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Thu, 17 Nov 2016 08:56:54 +0800 Subject: [PATCH] MDL-56865 behat: Don't set error handler for behat install --- lib/setup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index f80ce6b4ff4..fb16784eccd 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -553,8 +553,8 @@ if (!PHPUNIT_TEST or PHPUNIT_UTIL) { } // Acceptance tests needs special output to capture the errors, -// but not necessary for behat CLI command. -if (defined('BEHAT_SITE_RUNNING') && !defined('BEHAT_TEST')) { +// but not necessary for behat CLI command and init script. +if (defined('BEHAT_SITE_RUNNING') && !defined('BEHAT_TEST') && !defined('BEHAT_UTIL')) { require_once(__DIR__ . '/behat/lib.php'); set_error_handler('behat_error_handler', E_ALL | E_STRICT); }