Browse Source

Added default value for error in Model::addError().

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
6c5dfc04f7
  1. 2
      framework/yii/base/Model.php

2
framework/yii/base/Model.php

@ -476,7 +476,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* @param string $attribute attribute name
* @param string $error new error message
*/
public function addError($attribute, $error)
public function addError($attribute, $error = '')
{
$this->_errors[$attribute][] = $error;
}

Loading…
Cancel
Save