mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fix @var tags syntax in base, behaviors and caching folder (#20390)
This commit is contained in:
@ -239,8 +239,7 @@ class SluggableBehavior extends AttributeBehavior
|
||||
*/
|
||||
protected function validateSlug($slug)
|
||||
{
|
||||
/* @var $validator UniqueValidator */
|
||||
/* @var $model BaseActiveRecord */
|
||||
/** @var UniqueValidator $validator */
|
||||
$validator = Yii::createObject(array_merge(
|
||||
[
|
||||
'class' => UniqueValidator::className(),
|
||||
@ -248,6 +247,7 @@ class SluggableBehavior extends AttributeBehavior
|
||||
$this->uniqueValidator
|
||||
));
|
||||
|
||||
/** @var BaseActiveRecord $model */
|
||||
$model = clone $this->owner;
|
||||
$model->clearErrors();
|
||||
$model->{$this->slugAttribute} = $slug;
|
||||
|
||||
Reference in New Issue
Block a user