Merge pull request #93 from IgorNadj/patch-2

FIX logic error where a variable is used for two purposes
This commit is contained in:
Ingo Schommer 2015-08-25 15:31:07 +12:00
commit 4a9db2be90

View File

@ -351,9 +351,9 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
$fields = $this->getSession()->getPage()->findAll('named', array(
'field', $this->getSession()->getSelectorsHandler()->xpathLiteral($field)
));
if($fields) foreach($fields as $field) {
if($field->isVisible()) {
$field->setValue($value);
if($fields) foreach($fields as $f) {
if($f->isVisible()) {
$f->setValue($value);
return;
}
}