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

Bug #4597 PEAR_INSTALL_DIR constant might be empty
Submitted: 2005-06-15 09:50 UTC
From: arjan at eyefi dot nl Assigned: cweiske
Status: Closed Package: Image_Barcode
PHP Version: 4.3.11 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-15 09:50 UTC] arjan at eyefi dot nl
Description: ------------ On some installations, the PEAR_INSTALL_DIR constant is set by PHP but might be empty. In this case, Barcode.php tries to include files from a wrong path, at line 64 of Barcode.php. I think it is wise that Barcode.php should not depend on using this constant, as other PEAR packages do neither. Reproduce code: --------------- // this fails, in the case that PEAR_INSTALL_DIR is // undefined or an empty string: require_once "Image/Barcode.php"; Actual result: -------------- Opendir() fails on the directory: "/Image/Barcode"

Comments

 [2005-06-15 09:56 UTC] arjan at eyefi dot nl
A possible fix is the following: replace line 64 of Barcode.php with: $barcodepath = dirname(__FILE__) . DIRECTORY_SEPARATOR . "Barcode";
 [2006-04-04 16:38 UTC] pardocorp at yahoo dot com (pardocorp)
it's works thanks :P
 [2006-10-09 13:10 UTC] fabrice at solunix dot fr (Faber)
Thanks for the fix. Works fine.
 [2006-12-13 18:52 UTC] cweiske (Christian Weiske)
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.