From 70c68402ea778e36c8b071ef913e130479a016b7 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 26 Oct 2015 14:29:03 +0100 Subject: [PATCH] Fluent: prevents doubled processing --- src/Dibi/Fluent.php | 1 + tests/dibi/Fluent.select.phpt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/Dibi/Fluent.php b/src/Dibi/Fluent.php index d4ee9398..2cc68e49 100644 --- a/src/Dibi/Fluent.php +++ b/src/Dibi/Fluent.php @@ -189,6 +189,7 @@ class Fluent implements IDataSource foreach ($args as $arg) { if ($arg instanceof self) { + $this->cursor[] = '%SQL'; $arg = "($arg)"; } $this->cursor[] = $arg; diff --git a/tests/dibi/Fluent.select.phpt b/tests/dibi/Fluent.select.phpt index 19b5aa85..a9257362 100644 --- a/tests/dibi/Fluent.select.phpt +++ b/tests/dibi/Fluent.select.phpt @@ -1,5 +1,9 @@