Commit 9d73048b by Qiang Xue

Fixes #1791.

parent daf6c81f
...@@ -249,7 +249,13 @@ class ActiveQuery extends Query implements ActiveQueryInterface ...@@ -249,7 +249,13 @@ class ActiveQuery extends Query implements ActiveQueryInterface
if (!empty($with)) { if (!empty($with)) {
foreach ($with as $name => $value) { foreach ($with as $name => $value) {
$this->with[$name] = $value; if (is_integer($name)) {
if (in_array($value, $this->with, true)) {
$this->with[] = $value;
}
} elseif (!isset($this->with[$name])) {
$this->with[$name] = $value;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment