Commit 8a0ee80d authored by webchick's avatar webchick
Browse files

#329224 by boombatower and chx: November...

#329224 by boombatower and chx: November Make-All-Tests-Pass-Again-Extravaganza: Fix notices in block tests.
parent d2719c2a
......@@ -45,7 +45,7 @@ public function __toString() {
$max_placeholder = 0;
$values = array();
if (count($this->insertValues)) {
if ($this->insertValues) {
foreach ($this->insertValues as $insert_values) {
$placeholders = array();
......@@ -61,11 +61,14 @@ public function __toString() {
$values[] = '('. implode(', ', $placeholders) .')';
}
}
else {
elseif ($this->defaultFields) {
// If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')';
}
else {
$values[] = '(default)';
}
$query .= implode(', ', $values);
......
......@@ -75,7 +75,7 @@ public function __toString() {
$max_placeholder = 0;
$values = array();
if (count($this->insertValues)) {
if ($this->insertValues) {
foreach ($this->insertValues as $insert_values) {
$placeholders = array();
......@@ -91,11 +91,14 @@ public function __toString() {
$values[] = '(' . implode(', ', $placeholders) . ')';
}
}
else {
elseif ($this->defaultFields) {
// If there are no values, then this is a default-only query. We still need to handle that.
$placeholders = array_fill(0, count($this->defaultFields), 'default');
$values[] = '(' . implode(', ', $placeholders) .')';
}
else {
$values[] = '(default)';
}
$query .= implode(', ', $values);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment