bug72447.phpt 451 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #72447: Type Confusion in php_bz2_filter_create()
  3. --EXTENSIONS--
  4. bz2
  5. --FILE--
  6. <?php
  7. $input = "AAAAAAAA";
  8. $param = array('blocks' => $input);
  9. $fp = fopen('testfile', 'w');
  10. stream_filter_append($fp, 'bzip2.compress', STREAM_FILTER_WRITE, $param);
  11. fclose($fp);
  12. ?>
  13. --CLEAN--
  14. <?php
  15. unlink('testfile');
  16. ?>
  17. --EXPECTF--
  18. Warning: stream_filter_append(): Invalid parameter given for number of blocks to allocate (0) in %s%ebug72447.php on line %d