1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2020-06-25 07:14:49 -04:00
parent a2884184e1
commit 133ea5b222

View File

@@ -641,7 +641,11 @@ abstract class DatabaseQuery extends WireData {
} else {
list($prepend, $split, $append) = $this->queryMethods[$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));
if(!strlen($sql) || $sql === trim($split)) return '';
$sql = $prepend . $sql . $append;