|
|
@ -55,9 +55,11 @@ class ActiveRelation extends ActiveQuery |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function __clone() |
|
|
|
public function __clone() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (is_object($this->via)) { |
|
|
|
|
|
|
|
// make a clone of "via" object so that the same query object can be reused multiple times |
|
|
|
// make a clone of "via" object so that the same query object can be reused multiple times |
|
|
|
|
|
|
|
if (is_object($this->via)) { |
|
|
|
$this->via = clone $this->via; |
|
|
|
$this->via = clone $this->via; |
|
|
|
|
|
|
|
} elseif (is_array($this->via)) { |
|
|
|
|
|
|
|
$this->via = [$this->via[0], clone $this->via[1]]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|