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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2006-12-27 04:59 UTC
Package:
Bug Type:
Summary:
From: ieure at php dot net
New email:
PHP Version: Package Version: OS:

 

 [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.