Commit 6c5dfc04 by Qiang Xue

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

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