Browse Source

Fixed constructor overriding to allow array configuration

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
e4c98f0fa3
  1. 5
      apps/advanced/common/models/forms/ResetPasswordForm.php

5
apps/advanced/common/models/forms/ResetPasswordForm.php

@ -22,11 +22,11 @@ class ResetPasswordForm extends Model
* Creates a form model given a 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
*/
public function __construct($token)
public function __construct($token, $config = [])
{
parent::__construct();
if (empty($token) || !is_string($token)) {
throw new InvalidParamException('Password reset token cannot be blank.');
}
@ -37,6 +37,7 @@ class ResetPasswordForm extends Model
if (!$this->_user) {
throw new InvalidParamException('Wrong password reset token.');
}
parent::__construct($config);
}
/**

Loading…
Cancel
Save