Commit 66fcf622 by Alexander Makarov

Fixed Model::getFirstErrors()

parent 5f0f721c
...@@ -429,9 +429,9 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess ...@@ -429,9 +429,9 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
return array(); return array();
} else { } else {
$errors = array(); $errors = array();
foreach ($this->_errors as $errors) { foreach ($this->_errors as $attributeErrors) {
if (isset($errors[0])) { if (isset($attributeErrors[0])) {
$errors[] = $errors[0]; $errors[] = $attributeErrors[0];
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment