Annotation of embedaddon/php/ext/zip/tests/bug7214.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #7214 (zip_entry_read() binary safe)
! 3: --SKIPIF--
! 4: <?php
! 5: /* $Id: bug7214.phpt 260091 2008-05-21 09:27:41Z pajoye $ */
! 6: if(!extension_loaded('zip')) die('skip');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: $zip = zip_open(dirname(__FILE__)."/binarynull.zip");
! 11: if (!is_resource($zip)) die("Failure");
! 12: $entries = 0;
! 13: $entry = zip_read($zip);
! 14: $contents = zip_entry_read($entry, zip_entry_filesize($entry));
! 15: if (strlen($contents) == zip_entry_filesize($entry)) {
! 16: echo "Ok";
! 17: } else {
! 18: echo "failed";
! 19: }
! 20:
! 21: ?>
! 22: --EXPECT--
! 23: Ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>