diff --git a/src/models/TargetSettingModel.php b/src/models/TargetSettingModel.php index a40b5bd..50af3f8 100644 --- a/src/models/TargetSettingModel.php +++ b/src/models/TargetSettingModel.php @@ -179,7 +179,7 @@ public function setSetting($key, $value, $targetType = '', $targetId = 0, $descr public function removeSetting($key, $targetType = '', $targetId = 0) { $conditions = ['target_type' => $targetType, 'target_id' => $targetId, 'key' => $key]; - if (!$model = static::find()->where($conditions)->limit(1)->one()) { + if ($model = static::find()->where($conditions)->limit(1)->one()) { return $model->delete(); } return false;