It now takes into account, theming hooks that haven't registered its arguments properly in modules. I noticed many in core some in contrib so this hardening will prevent the theme from failing.

It creates an argument buffer which is checked to make sure it isn't overwritten. It only does this for 3 places beyond what's already there so if a module invokes a theme function with arguments beyond the three buffered arguments, it will still fail. I could add more but most theming hooks are fine and in would incur more processing. 3 seems to work well from my testing.

Theming hooks with numeric arguments are ignored completely but those are in the small minority.

This only affects theming hooks implemented as *functions* and it only matters when variable preprocessors are created for them. It also affects Drupal core versions 6.15 and below when there are include files that need to be loaded since it uses a preprocess function to load them. 6.16 does the loading directly in the theme() function.

CommentFileSizeAuthor
#1 hexagon-811118.patch15.37 KBdvessel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dvessel’s picture

FileSize
15.37 KB

Patch!

Status: Fixed » Closed (fixed)

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