Updating nodes through node_save when not creating new revisions generates undefined property notices:

Undefined property: stdClass::$revision File /var/www/html/ecl/docroot/sites/all/modules/contrib/uuid/uuid.module, line 60(file: /var/www/html/ecl/docroot/sites/all/modules/contrib/uuid/uuid.module, line 60)

The test on that line should be !empty($node->revision) rather than simply $node->revision.

CommentFileSizeAuthor
#1 uuid_notice.patch988 bytesmikeryan

Comments

mikeryan’s picture

Status: Active » Needs review
StatusFileSize
new988 bytes

Patch attached.

recidive’s picture

Status: Needs review » Needs work

Hi, thanks for the patch.

I think it's better using isset() rather than !empty() in this case. Can you test with isset() and see if it solves the problem you outlined?

Thanks.

mikeryan’s picture

That works fine for us as well, thanks.

recidive’s picture

Status: Needs work » Fixed

Thanks. I've commited the isset() fix to 6.1.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.