I've wondered why $node is not defined anymore in my theme's page.tpl.php.
The reason is a modified expression in phptemplate.engine, which now reads:

if ((arg(0) == 'node') && is_int(arg(1))) {

arg(1) may be the node number, but it is a string variable, and therefore this check is always false.
is_int should be replaced with the code given in the patch.

Comments

Robrecht Jacques’s picture

StatusFileSize
new739 bytes

Rerolled the patch (and changed the coding: eg Drupal uses "&&", not "and"). I think wiz is correct: you should use "is_numeric" here, not "is_int".

Dave Cohen’s picture

Consider: if (arg(1) && ctype_digit(arg(1)));

reportedly performs better than is_numeric(), and true only for integers.

dries’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)