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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 16 - 11 = ?

 
 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!