PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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.