Home » Images » Image_Barcode » Bug #4597
PEAR_INSTALL_DIR constant might be empty
Details
| 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) |
Comments
[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"
[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
it's works thanks :P
[2006-10-09 13:10 UTC] fabrice at solunix dot fr
Thanks for the fix.
Works fine.