Skip to content

Commit d2a1886

Browse files
committed
Fix counting of non-countable versions for PHP 7.2
Update sfFormField.class.php Update sfFormField.class.php remove null !== $this->error fix by e1himself Update sfFormField.class.php test travis
1 parent d8b44b8 commit d2a1886

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/form/sfFormField.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ public function getError()
324324
*/
325325
public function hasError()
326326
{
327-
return null !== $this->error && count($this->error);
327+
if ($this->error instanceof sfValidatorErrorSchema) {
328+
return $this->error->count() > 0;
329+
}
330+
331+
return $this->error !== null;
328332
}
329333
}

0 commit comments

Comments
 (0)