-
Bug
-
Resolution: Fixed
-
Minor
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_25_STABLE
-
This is a followup of MDL-39478... copying from there:
Aha, just found a problem with your code in setup.php not being re-entrant (and "theme/yui_combo.php" requires all code in setup.php to be re-entrant).
Error (in the :8000 web browser):
[Tue May 7 18:19:23 2013] PHP Notice: Constant BEHAT_SITE_RUNNING already defined in lib/setup.php on line 131
[Tue May 7 18:19:23 2013] PHP Stack trace:
[Tue May 7 18:19:23 2013] PHP 1. {main}() theme/yui_combo.php:0
[Tue May 7 18:19:23 2013] PHP 2. require() theme/yui_combo.php:94
[Tue May 7 18:19:23 2013] PHP 3. define() lib/setup.php:131
So yui_combo.php includes setup.php again that will be run until the ABORT_AFTER_CONFIG_CANCEL point. And your behat setup code is before that ABORT_AFTER_CONFIG_CANCEL point.
So, there are 2 solutions...
- Or you move the behat code after the ABORT_AFTER_CONFIG_CANCEL point.
- Or you make the behat code re-entrant, so the define is executed conditionally.
I'm going to try the 2nd alternative...
- Testing discovered
-
MDL-39478 Use a constant instead of !empty($CFG->originaldataroot)
- Closed