dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
6d05d61
)
Merge "Fix ORMRow::insert() on PostgreSQL."
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Tue, 12 Mar 2013 11:59:29 +0000
(11:59 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Tue, 12 Mar 2013 11:59:29 +0000
(11:59 +0000)
includes/db/ORMRow.php
patch
|
blob
|
history
diff --git
a/includes/db/ORMRow.php
b/includes/db/ORMRow.php
index
7fb7ae1
..
6c1f27f
100644
(file)
--- a/
includes/db/ORMRow.php
+++ b/
includes/db/ORMRow.php
@@
-261,6
+261,11
@@
class ORMRow implements IORMRow {
if ( array_key_exists( $name, $this->fields ) ) {
$value = $this->fields[$name];
+ // Skip null id fields so that the DBMS can set the default.
+ if ( $name === 'id' && is_null ( $value ) ) {
+ continue;
+ }
+
switch ( $type ) {
case 'array':
$value = (array)$value;