mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixed Model::getFirstErrors()
This commit is contained in:
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user