Home » HTML » HTML_Template_Flexy » Bug #3129
setRequired needs pass by reference arg
Details
| Submitted | 2005-01-07 03:57 UTC |
|---|---|
| From | dave at sus4 dot net |
| Assigned | alan_k |
| Status | Closed |
| Package | HTML_Template_Flexy |
| PHP Version | 4.3.10 |
| OS | irrelevant |
| 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.