summaryrefslogtreecommitdiff
path: root/ext/exif
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2002-08-25 18:48:46 +0000
committerMarcus Boerger <helly@php.net>2002-08-25 18:48:46 +0000
commit412c2ba7a39f78352de09ea8815e306ca82f2d83 (patch)
tree1be7513fdb0144c47ab633dd5556393c9fdd813f /ext/exif
parenta1f7bb12f1cd3ba6bb50e1b749537095813d38b2 (diff)
downloadphp-git-412c2ba7a39f78352de09ea8815e306ca82f2d83.tar.gz
MFB
Diffstat (limited to 'ext/exif')
-rw-r--r--ext/exif/tests/002.phpt23
1 files changed, 12 insertions, 11 deletions
diff --git a/ext/exif/tests/002.phpt b/ext/exif/tests/002.phpt
index d9e2298a5d..d52ba67e53 100644
--- a/ext/exif/tests/002.phpt
+++ b/ext/exif/tests/002.phpt
@@ -2,8 +2,8 @@
Check for exif_thumbnail
--SKIPIF--
<?php if (!extension_loaded("exif")) print "skip";?>
---POST--
---GET--
+--INI--
+magic_quotes_runtime=0
--FILE--
<?php
/*
@@ -11,16 +11,17 @@ Check for exif_thumbnail
test2.jpg is the same image but contains Exif/Comment information and a
copy of test1.jpg as a thumbnail.
*/
-$istat= stat('./ext/exif/tests/test1.jpg');
-$fp = fopen('./ext/exif/tests/test1.jpg','r');
-$image = fread($fp,$istat[7]);
-echo substr($image,490,5).'_'.$istat[7];
+if (function_exists("ob_end_clean")) ob_end_clean();
+$infile= './ext/exif/tests/test1.jpg';
+$fp = fopen($infile,'rb');
+$image = fread($fp,filesize($infile));
+//$image = stripslashes($image);
+echo md5($image).'_'.filesize($infile);
fclose($fp);
$thumb = exif_thumbnail('./ext/exif/tests/test2.jpg');
-echo strcmp($image,$thumb) ? 'different' : '_identical_';
-echo strlen($thumb);
-echo '_'.substr($thumb,490,5);
-/* 7GWgw_523_identical_523_7GWgw */
+echo strcmp($image,$thumb) ? '_different_' : '_identical_';
+echo strlen($thumb).'_'.md5($thumb);
+echo "\n";
?>
--EXPECT--
-7GWgw_523_identical_523_7GWgw
+27bbfd9fc10e1e663d749f5225447905_523_identical_523_27bbfd9fc10e1e663d749f5225447905