Closed lantian closed 10 years ago
https://github.com/phalcon/cphalcon/blob/1.3.0/ext/mvc/model.c#L2268 Throws an exception ErrorException: First argument is not an array
With code:
public function validation() { $this->validate(new Uniqueness(["field" => "username"])); $this->validate(new Uniqueness(["field" => "email"])); $this->validate(new Email(["field" => "email", "required" => true])); $this->validate(new StringLength(["field" => "password", "min" => 6])); return $this->validationHasFailed() !== true; }
If you manually runs:
$model->validation();
This is cozed by _errorsMessages = null; Fast fix for this:
public function validation() { if ($this->_errorMessages === null) { $this->_errorMessages = []; } ... }
I'll try to fix it.
Thanks
https://github.com/phalcon/cphalcon/blob/1.3.0/ext/mvc/model.c#L2268 Throws an exception ErrorException: First argument is not an array
With code:
If you manually runs:
This is cozed by _errorsMessages = null; Fast fix for this: