The module does not check whether the node has a title or not, and sometimes nodes do not have one. This makes PHP 5.3 throw notices.

CommentFileSizeAuthor
#1 token_node_no_title-1294402-1.patch954 bytesfgm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fgm’s picture

Suggested patch.

fgm’s picture

Issue tags: +php5.3

Forfot to add tag.

Dave Reid’s picture

Status: Needs review » Postponed (maintainer needs more info)

The $node->title property should *always* be defined. What module doesn't provide the title property?

fgm’s picture

Hard to tell: I noticed this on a site with several hundred modules enabled. This happens because the token is being accessed fairly long before the node build is done and before the node the is saved.

I could dig deeper if you really think it is needed, but it seems logical that this might happen: referencing a token before the underlying data is completely prepared is something token should handle properly.

Dave Reid’s picture

Hrm, but $node->title should *always* exist. Token replacement before data is prepared is a fundamental error we can't really handle because at that point the basic data should always exist.

Dave Reid’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)