Fixed test break

This commit is contained in:
Alexander Makarov
2015-10-10 01:16:16 +03:00
parent 8260cfa4ea
commit 70cfdfd289

View File

@ -111,7 +111,7 @@ class ExistValidator extends Validator
$query = $this->createQuery($targetClass, $params);
if (is_array($model->$attribute)) {
if ($query->count("DISTINCT [[$targetAttribute]]") !== count($model->$attribute)) {
if ($query->count("DISTINCT [[$targetAttribute]]") != count($model->$attribute)) {
$this->addError($model, $attribute, $this->message);
}
} elseif (!$query->exists()) {