mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-60281 behat: remove unnecessary pre-check
These variables are strings, calling count() on string causes warning in PHP7.2
This commit is contained in:
parent
9a316f3367
commit
2abb1e888c
@ -141,15 +141,9 @@ class behat_form_select extends behat_form_field {
|
||||
$values = $this->get_selected_options(false);
|
||||
$selectedoptionvalues = $this->get_unescaped_options($values);
|
||||
|
||||
// Precheck to speed things up.
|
||||
if (count($expectedoptions) !== count($selectedoptiontexts) ||
|
||||
count($expectedoptions) !== count($selectedoptionvalues)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We check against string-ordered lists of options.
|
||||
if ($expectedoptions != $selectedoptiontexts &&
|
||||
$expectedoptions != $selectedoptionvalues) {
|
||||
if ($expectedoptions !== $selectedoptiontexts &&
|
||||
$expectedoptions !== $selectedoptionvalues) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user