Browse Source

Fixed Model::getFirstErrors()

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
66fcf622aa
  1. 6
      framework/base/Model.php

6
framework/base/Model.php

@ -429,9 +429,9 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
return array();
} else {
$errors = array();
foreach ($this->_errors as $errors) {
if (isset($errors[0])) {
$errors[] = $errors[0];
foreach ($this->_errors as $attributeErrors) {
if (isset($attributeErrors[0])) {
$errors[] = $attributeErrors[0];
}
}
}

Loading…
Cancel
Save