Commit 4c0a0006 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#188462 by bjaspan: null value in revision log field violated non-null constraint in PostgreSQL

parent 54732ddf
......@@ -780,6 +780,15 @@ function node_save(&$node) {
if (empty($node->nid)) {
// Insert a new node.
$node->is_new = TRUE;
// When inserting a node, $node->log must be set because
// {node_revisions}.log does not (and cannot) have a default
// value. If the user does not have permission to create
// revisions, however, the form will not contain an element for
// log so $node->log will be unset at this point.
if (!isset($node->log)) {
$node->log = '';
}
}
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