fix model's initialization bugs

This commit is contained in:
Antonio Ramirez
2017-06-15 00:29:03 +02:00
parent 6f11bbab88
commit 9acc00369f
2 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class Profile extends ActiveRecord
'timeZoneValidation' => [
'timezone',
function ($attribute) {
if ($this->make(TimeZoneValidator::class, [$attribute])->validate()) {
if ($this->make(TimeZoneValidator::class, [$this->{$attribute}])->validate()) {
$this->addError($attribute, Yii::t('usuario', 'Time zone is not valid'));
}
},