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(); 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];
} }
} }
} }

Loading…
Cancel
Save