Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit a1e6d5d

Browse files
author
Nik Barham
committed
Subqueries should clone QueryBuilder object
1 parent f048370 commit a1e6d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/QueryBuilder/SubQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SubQuery extends Table
2222
public function __construct($query, ?string $alias = 'subquery')
2323
{
2424
if ($query instanceof QueryBuilder) {
25-
$this->sub = $query;
25+
$this->sub = clone $query;
2626
} elseif ($query instanceof SqlString) {
2727
$this->sql = (string) $query;
2828
} elseif (is_string($query)) {

0 commit comments

Comments
 (0)