diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-11 14:31:12 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-11 14:31:12 +0000 |
commit | 96668d576cce83ee8082e186149c4504c75c3a2d (patch) | |
tree | 0f39367ac49b78d0d1096dc039051908a8e66b52 | |
parent | 8028bc2e76e22beda2ab9002ec177e5fcdb98eb6 (diff) | |
download | brdo-96668d576cce83ee8082e186149c4504c75c3a2d.tar.gz brdo-96668d576cce83ee8082e186149c4504c75c3a2d.tar.bz2 |
#195169 (actually a fix to #199161) by bjaspan: do not rely on buggy MySQL behavior of assuming empty default value for NOT NULL columns, fixing poll submission on PostgreSQL
-rw-r--r-- | modules/node/node.module | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 601260227..5f945bdb3 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -830,6 +830,16 @@ function node_save(&$node) { if (!isset($node->log)) { $node->log = ''; } + + // For the same reasons, make sure we have $node->teaser and + // $node->body. We should consider making these fields nullable + // in a future version since node types are not required to use them. + if (!isset($node->teaser)) { + $node->teaser = ''; + } + if (!isset($node->body)) { + $node->body = ''; + } } elseif (!empty($node->revision)) { $node->old_vid = $node->vid; |