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 #615

Constructor attempt to return PEAR_Error

Details

Submitted2004-01-24 02:57 UTC
Fromahundiak at ingr dot com
Assignedalan_k
StatusClosed
PackageHTML_Template_Flexy
PHP VersionIrrelevant
OSNA - 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.