Skip to content
Snippets Groups Projects
Commit 8a0ee80d authored by Angie Byron's avatar Angie Byron
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
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment