mirror of
https://github.com/dg/dibi.git
synced 2025-08-15 02:25:10 +02:00
DibiFluent: fixed combination of modifier and inner fluent [Closes #192]
This commit is contained in:
@@ -175,7 +175,10 @@ class DibiFluent extends DibiObject implements IDataSource
|
||||
} elseif (is_string($arg) && preg_match('#^[a-z:_][a-z0-9_.:]*\z#i', $arg)) { // identifier
|
||||
$args = array('%n', $arg);
|
||||
|
||||
} elseif (is_array($arg) || ($arg instanceof Traversable && !$arg instanceof self)) { // any array
|
||||
} elseif ($arg instanceof self) {
|
||||
$args = array('%SQL', $arg);
|
||||
|
||||
} elseif (is_array($arg) || $arg instanceof Traversable) { // any array
|
||||
if (isset(self::$modifiers[$clause])) {
|
||||
$args = array(self::$modifiers[$clause], $arg);
|
||||
|
||||
@@ -187,7 +190,6 @@ class DibiFluent extends DibiObject implements IDataSource
|
||||
|
||||
foreach ($args as $arg) {
|
||||
if ($arg instanceof self) {
|
||||
$this->cursor[] = '%SQL';
|
||||
$arg = "($arg)";
|
||||
}
|
||||
$this->cursor[] = $arg;
|
||||
|
Reference in New Issue
Block a user