Active
Project:
PHPTemplate
Version:
master
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2007 at 23:47 UTC
Updated:
18 Jul 2007 at 23:47 UTC
Declare the following in template.php
phptemplate_hooktotheme() {
_phptemplate_callback('my_tplfile', $vars, 'suggested_tpl');
}
You'll receive a host of php warnings regarding foreach() receiving a non-array. While it should be standard practice for template coders to pass in arrays when they should and pass in variables when they should, perhaps relying on that may not be the most desirable thing. A sanity check to make sure that values passed in are what you expect them to be would be ideal -- something as simple as a cast into array within _phptemplate_callback() or checking with is_array() before handling might do the trick.