mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
Merge branch 'MDL-58761_bad_regex_in_custom_step' of https://github.com/gthomas2/moodle
This commit is contained in:
commit
7de5101d4e
@ -539,7 +539,7 @@ class behat_navigation extends behat_base {
|
||||
$bodynode = $this->find('xpath', 'body');
|
||||
$bodyclass = $bodynode->getAttribute('class');
|
||||
$matches = [];
|
||||
if (preg_match('/(?<=^course-|\scourse-)\d/', $bodyclass, $matches) && !empty($matches)) {
|
||||
if (preg_match('/(?<=^course-|\scourse-)\d+/', $bodyclass, $matches) && !empty($matches)) {
|
||||
$courseid = intval($matches[0]);
|
||||
} else {
|
||||
$courseid = SITEID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user