diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-07 06:44:56 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-07 06:44:56 +0000 |
commit | 8a0ee80de6dc48c449f7f7deae2420d72702bdcf (patch) | |
tree | b0f8d06ba073a9e9183adb2ad36c66562f54fc35 /includes/database/pgsql/query.inc | |
parent | d2719c2a89cbed5e41767cf60d7bc984955e3ded (diff) | |
download | brdo-8a0ee80de6dc48c449f7f7deae2420d72702bdcf.tar.gz brdo-8a0ee80de6dc48c449f7f7deae2420d72702bdcf.tar.bz2 |
#329224 by boombatower and chx: November Make-All-Tests-Pass-Again-Extravaganza: Fix notices in block tests.
Diffstat (limited to 'includes/database/pgsql/query.inc')
-rw-r--r-- | includes/database/pgsql/query.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/database/pgsql/query.inc b/includes/database/pgsql/query.inc index dc9054a99..97e7cc135 100644 --- a/includes/database/pgsql/query.inc +++ b/includes/database/pgsql/query.inc @@ -75,7 +75,7 @@ class InsertQuery_pgsql extends InsertQuery { $max_placeholder = 0; $values = array(); - if (count($this->insertValues)) { + if ($this->insertValues) { foreach ($this->insertValues as $insert_values) { $placeholders = array(); @@ -91,11 +91,14 @@ class InsertQuery_pgsql extends InsertQuery { $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); |