Home » HTML » HTML_Template_Flexy » Bug #615
Constructor attempt to return PEAR_Error
Details
| Submitted | 2004-01-24 02:57 UTC |
|---|---|
| From | ahundiak at ingr dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | HTML_Template_Flexy |
| PHP Version | Irrelevant |
| OS | NA - linux/windows |
| Roadmaps | (Not assigned) |
Comments
[2004-01-24 02:57 UTC] ahundiak at ingr dot com
Description:
------------
The HTML_Template_Flexy constructor checks for the existence of the compiled template directory. If the directory is not found then the constructor attempts to return a PEAR_Error object. However, constructors are not allowed to return anything.
A patch is available from here:
http://www.cerad.org/pear/HTML_Template_Flexy/Flexy.php.diff.txt
The patch adds a factory method to the class and moves the directory checking code to it.
[2004-01-24 13:20 UTC] ahundiak at ingr dot com
OK. Though I think adding a factory method is a good idea anyways. And if the app does the usual PEAR error checking then compile would never be called.