mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 10:15:28 +02:00
Update for processwire/processwire-issues#1198
This commit is contained in:
@@ -641,7 +641,11 @@ abstract class DatabaseQuery extends WireData {
|
|||||||
} else {
|
} else {
|
||||||
list($prepend, $split, $append) = $this->queryMethods[$method];
|
list($prepend, $split, $append) = $this->queryMethods[$method];
|
||||||
$values = $this->$method;
|
$values = $this->$method;
|
||||||
if(!is_array($values) || !count($values)) return '';
|
if(!is_array($values)) return '';
|
||||||
|
foreach($values as $key => $value) {
|
||||||
|
if(!strlen(trim($value))) unset($values[$key]); // remove any blank values
|
||||||
|
}
|
||||||
|
if(!count($values)) return '';
|
||||||
$sql = trim(implode($split, $values));
|
$sql = trim(implode($split, $values));
|
||||||
if(!strlen($sql) || $sql === trim($split)) return '';
|
if(!strlen($sql) || $sql === trim($split)) return '';
|
||||||
$sql = $prepend . $sql . $append;
|
$sql = $prepend . $sql . $append;
|
||||||
|
Reference in New Issue
Block a user