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

Bug #3190 [PATCH] md5_file() depends on possibly nonexistent file_get_contents()
Submitted: 2005-01-13 20:15 UTC
From: ieure at php dot net Assigned: aidan
Status: Closed Package: PHP_Compat
PHP Version: Irrelevant OS: Linux
Roadmaps: 1.6.0a1    
Subscription  


 [2005-01-13 20:15 UTC] ieure at php dot net
Description: ------------ md5_file() is loaded when the 4.2.0 compat. profile is loaded, but it depends on file_get_contents(), which wasn't added until PHP 4.3.0. This patch loads file_get_contents() in md5_file(). It's against CVS: http://atomized.org/PEAR/Patches/PHP_Compat-md5_file.patch Reproduce code: --------------- <?php require_once 'PHP/Compat.php'; PHP_Compat::loadVersion('4.2.0'); $res = md5_file('/tmp/foo'); ?> Expected result: ---------------- md5_file() should return the MD5 hash of '/tmp/foo'. Actual result: -------------- Fatal error: Call to undefined function: file_get_contents() in /tmp/compat/PHP_Compat-1.3.1/Compat/Function/md5_file.php on line 52

Comments

 [2005-01-26 05:00 UTC] aidan
Fixed, thanks Ian.