Commit 96668d57 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#195169 (actually a fix to #199161) by bjaspan: do not rely on buggy MySQL...

#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
parent 8028bc2e
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment