php-src/ext/standard/tests/streams/bug61115.phpt
Gustavo André dos Santos Lopes d974e44248 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00

14 lines
417 B
PHP

--TEST--
Bug #61115: Stream related segfault on fatal error in php_stream_context_del_link.
--FILE--
<?php
$arrayLarge = array_fill(0, 113663, '*');
$resourceFileTemp = fopen('php://temp', 'r+');
stream_context_set_params($resourceFileTemp, array());
preg_replace('', function() {}, $resourceFileTemp);
?>
--EXPECTF--
Catchable fatal error: Object of class Closure could not be converted to string in %s on line %d