[drupal-devel] [bug] phptemplate.engine: is_int/is_numeric confusion
Robrecht Jacques
drupal-devel at drupal.org
Thu Sep 8 23:13:45 UTC 2005
Issue status update for
http://drupal.org/node/27781
Post a follow up:
http://drupal.org/project/comments/add/27781
Project: Drupal
Version: cvs
Component: theme system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: wiz
Updated by: Robrecht Jacques
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/phptemplate-is_int.patch (739 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".
Robrecht Jacques
Previous comments:
------------------------------------------------------------------------
Fri, 29 Jul 2005 16:59:38 +0000 : wiz
Attachment: http://drupal.org/files/issues/phptemplate_node.patch (720 bytes)
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.
More information about the drupal-devel
mailing list