php-src/ext/libxml/tests/bug63389.phpt
Xinchen Hui 2f1c4064f8 Fixed bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
Simply change the expect parameter type, the valid of the resource will
be checked in using time.
2012-10-30 11:08:14 +08:00

15 lines
420 B
PHP

--TEST--
Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
--SKIPIF--
<?php if (!extension_loaded('libxml')) die('skip'); ?>
--FILE--
<?php
$fp = fopen("php://input", "r");
libxml_set_streams_context($fp);
libxml_set_streams_context("a");
echo "okey";
?>
--EXPECTF--
Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %sbug63389.php on line %d
okey