Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC2

Bug #14464 fatal error occurs if Output driver is set incorrectly
Submitted: 2008-08-06 23:18 UTC
From: kguest Assigned: kguest
Status: Closed Package: PEAR_Size (version 0.1.4)
PHP Version: 5.2.4 OS: ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2008-08-06 23:18 UTC] kguest (Ken Guest)
Description: ------------ if you call the setOutputDriver method with an incorrect type, either due to a typo or that the driver does not exist, a fatal error is raised. Expected result: ---------------- there is a lack of error handling in the createInstance method of the PEAR_SIZE_OutputFactory class - some form of handling should be in place so that a user-friendly message is displayed. Actual result: -------------- $ pearsize -C pear_size Warning: PEAR_SIZE_OutputFactory::require(PEAR/Size/Output_cvs.php): failed to open stream: No such file or directory in /usr/share/php/PEAR/Size/Factory.php on line 268 Call Stack: 0.0002 67692 1. {main}() /usr/bin/pearsize:0 0.0249 2406564 2. PEAR_Size_CLI->run() /usr/bin/pearsize:33 0.0506 3771852 3. PEAR_Size->parseCLIOptions() /usr/share/php/PEAR/Size/CLI.php:223 0.0506 3771852 4. PEAR_Size->setOutputDriver() /usr/share/php/PEAR/Size.php:512 0.0506 3771920 5. PEAR_SIZE_OutputFactory->createInstance() /usr/share/php/PEAR/Size.php:345 Fatal error: PEAR_SIZE_OutputFactory::require(): Failed opening required 'PEAR/Size/Output_cvs.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/php/PEAR/Size/Factory.php on line 268 Call Stack: 0.0002 67692 1. {main}() /usr/bin/pearsize:0 0.0249 2406564 2. PEAR_Size_CLI->run() /usr/bin/pearsize:33 0.0506 3771852 3. PEAR_Size->parseCLIOptions() /usr/share/php/PEAR/Size/CLI.php:223 0.0506 3771852 4. PEAR_Size->setOutputDriver() /usr/share/php/PEAR/Size.php:512 0.0506 3771920 5. PEAR_SIZE_OutputFactory->createInstance() /usr/share/php/PEAR/Size.php:345

Comments

 [2008-08-06 23:28 UTC] kguest (Ken Guest)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. added check to determine if the output driver is present in a PEAR/Size/ directory off any of the directories specified in the include path - if not a "Output driver PEAR/Size/______.php could not be found." exception is thrown.