summaryrefslogtreecommitdiff
path: root/includes/database/query.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-20 05:44:03 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-20 05:44:03 +0000
commite5350c1905275af6d5b9df925106cfc7a6f0b12f (patch)
treedcde2cf5ff4292b36dcc8a7f692f821915f3aa10 /includes/database/query.inc
parent9df38a58a4430e544e484e74bba37825914317f0 (diff)
downloadbrdo-e5350c1905275af6d5b9df925106cfc7a6f0b12f.tar.gz
brdo-e5350c1905275af6d5b9df925106cfc7a6f0b12f.tar.bz2
#445214 by Josh Waihi: Fix drupal_write_record() to correctly deal with NULL serial columns.
Diffstat (limited to 'includes/database/query.inc')
-rw-r--r--includes/database/query.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/database/query.inc b/includes/database/query.inc
index 8cdaaf5e1..db0cd31ed 100644
--- a/includes/database/query.inc
+++ b/includes/database/query.inc
@@ -288,7 +288,9 @@ class InsertQuery extends Query {
protected $insertValues = array();
public function __construct($connection, $table, array $options = array()) {
- $options['return'] = Database::RETURN_INSERT_ID;
+ if (!isset($options['return'])) {
+ $options['return'] = Database::RETURN_INSERT_ID;
+ }
$options += array('delay' => FALSE);
parent::__construct($connection, $options);
$this->table = $table;