PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PHP » PHP_Compat » Bug #5469

md5_file just display the file contents :)

Details

Submitted2005-09-21 07:36 UTC
Fromjudas_iscariote at imapmail dot org
Assignedaidan
StatusClosed
PackagePHP_Compat
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2005-09-21 07:36 UTC] judas_iscariote at imapmail dot org

Description:
------------
try to use md5_file, you will get the file contents , not the actual hash,nor the raw output of it.

patch attached :-)

Test script:
---------------
--- md5_file.php.orig 2005-01-26 00:59:48.000000000 -0300
+++ md5_file.php 2005-09-21 03:25:11.000000000 -0400
@@ -69,6 +69,7 @@

fclose($fh);

+ $data = md5($data);
// Return
if ($raw_output === true) {
$data = pack('H*', $data);

Expected result:
----------------
should output the md5 hash.

Actual result:
--------------
just the plain file contents