pathauto_token_values('node') is sometimes invoked without a $vid property, causing php5.3 to throw a warning when accessing $object->vid without testing for its existence first.

CommentFileSizeAuthor
#1 token_node_no_vid-1294418-1.patch1.05 KBfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fgm’s picture

Status: Active » Needs review
FileSize
1.05 KB

Suggested patch fixex this

Status: Needs review » Needs work

The last submitted patch, token_node_no_vid-1294418-1.patch, failed testing.

fgm’s picture

Looking at the errors, they point to even more of the same in other places, but none where this patch changes code, meaning it is actually useful.

Dave Reid’s picture

Category: bug » support

A node object that does not have $vid defined in it would indicate the failure is higher up since it's invalid data.

fgm’s picture

AIUI it is valid, if the node does not have a nid either because it has not yet being saved, which is how this happens: tokens being generated before the node is actually saved.