PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Template_Flexy » Bug #3129

setRequired needs pass by reference arg

Details

Submitted2005-01-07 03:57 UTC
Fromdave at sus4 dot net
Assignedalan_k
StatusClosed
PackageHTML_Template_Flexy
PHP Version4.3.10
OSirrelevant
Roadmaps(Not assigned)

Comments

[2005-01-07 03:57 UTC] dave at sus4 dot net

Description:
------------
HTML_Template_Flexy_Factory::setRequired() does not return correctly without $ret being passed by reference. The comments infer that this is true, but the argument (&) is not in the function declaration.

Reproduce code:
---------------
Factory.php @line 139
- function setRequired($ret,$set,$format='<span class="required">*</span>') {
+ function setRequired(&$ret,$set,$format='<span class="required">*</span>') {

[2005-01-10 05:23 UTC] dave at sus4 dot net

This also needs to take place in the setErrors() method in the same file.

While these can be passed in at runtime, this practice is deprecated and really should be done at declaration anyway.