Commit e4c98f0f by Alexander Makarov

Fixed constructor overriding to allow array configuration

parent 6ad0d72a
...@@ -22,11 +22,11 @@ class ResetPasswordForm extends Model ...@@ -22,11 +22,11 @@ class ResetPasswordForm extends Model
* Creates a form model given a token * Creates a form model given a token
* *
* @param string $token * @param string $token
* @param array $config name-value pairs that will be used to initialize the object properties
* @throws \yii\base\InvalidParamException if token is empty or not valid * @throws \yii\base\InvalidParamException if token is empty or not valid
*/ */
public function __construct($token) public function __construct($token, $config = [])
{ {
parent::__construct();
if (empty($token) || !is_string($token)) { if (empty($token) || !is_string($token)) {
throw new InvalidParamException('Password reset token cannot be blank.'); throw new InvalidParamException('Password reset token cannot be blank.');
} }
...@@ -37,6 +37,7 @@ class ResetPasswordForm extends Model ...@@ -37,6 +37,7 @@ class ResetPasswordForm extends Model
if (!$this->_user) { if (!$this->_user) {
throw new InvalidParamException('Wrong password reset token.'); throw new InvalidParamException('Wrong password reset token.');
} }
parent::__construct($config);
} }
/** /**
......
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