mirror of
https://github.com/php/php-src.git
synced 2024-10-04 00:06:16 +00:00
2f1c4064f8
Simply change the expect parameter type, the valid of the resource will be checked in using time.
15 lines
420 B
PHP
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
|