MDL-59890 behat: Revert to checking if isset instead of not empty

Reverting changes made by commit
1957d33996
This commit is contained in:
Jun Pataleta
2017-10-04 14:24:15 +08:00
parent 32c369818c
commit 48a3a50aa4
+1 -1
View File
@@ -227,7 +227,7 @@ class behat_data_generators extends behat_base {
$methodname = 'get_' . $element . '_id';
// Not all the switch fields are required, default vars will be assigned by data generators.
if (!empty($elementdata[$element])) {
if (isset($elementdata[$element])) {
// Temp $id var to avoid problems when $element == $field.
$id = $this->{$methodname}($elementdata[$element]);
unset($elementdata[$element]);