Fixing bug for:
Notice: Undefined index: op in J:\_Webserver\cvs\modules\node\node.module on line 2044
Notice: Undefined index: destination in J:\_Webserver\cvs\modules\node\node.module on line 2047

Notice: Undefined variable: destination in J:\_Webserver\cvs\modules\node\node.module on line 2051

CommentFileSizeAuthor
#3 node_58.patch1.78 KBkeve
#1 node_56.patch1.68 KBkeve
node_55.patch831 byteskeve

Comments

keve’s picture

StatusFileSize
new1.68 KB

Fixing some more: (when creating new node)
Notice: Undefined property: stdClass::$nid in J:\_Webserver\cvs\modules\node\node.module on line 1605
Notice: Undefined property: stdClass::$vid in J:\_Webserver\cvs\modules\node\node.module on line 1605
Notice: Undefined property: stdClass::$changed in J:\_Webserver\cvs\modules\node\node.module on line 1605
Notice: Undefined property: stdClass::$nid in J:\_Webserver\cvs\modules\node\node.module on line 1656

drumm’s picture

Status: Needs review » Needs work

The second condition in the second hunk simply checks if the node id is not 0; I don't think that is needed.

drupal_goto()'s default value for where $destination is used is NULL. I think the defualt value of $destination should be NULL instead.

keve’s picture

StatusFileSize
new1.78 KB

Rerolled to HEAD.

bdragon’s picture

Version: x.y.z » 6.x-dev
Status: Needs work » Closed (fixed)

Out of date HEAD warning fix patch closing -- Since HEAD must be E_ALL
compliant now, I am certain this has been fixed.

drzraf’s picture

Trying to get property of non-object node.module:2088
Undefined property: stdClass::$changed node.module:970

If you node_validate() a new node:
node_last_changed() will try to fetch "created" from the DB node object but that property does not exists.
Then it will check this against $node->created which may be NULL too (if inserted programmatically).

In the worse case, you can get spurious "The content on this page has either been modified by another user, or you have already submitted modifications..."
Some more checks of variables are probably needed here.

drzraf’s picture

(hum... I was using fake (rand()) nid, so my node->nid existed without being in the DB)