mirror of
https://github.com/php/php-src.git
synced 2026-03-29 19:52:20 +02:00
19 lines
482 B
PHP
19 lines
482 B
PHP
--TEST--
|
|
Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded('libxml')) die('skip libxml extension not available'); ?>
|
|
--FILE--
|
|
<?php
|
|
$fp = fopen("php://input", "r");
|
|
libxml_set_streams_context($fp);
|
|
try {
|
|
libxml_set_streams_context("a");
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
echo "okey";
|
|
?>
|
|
--EXPECT--
|
|
libxml_set_streams_context() expects parameter 1 to be resource, string given
|
|
okey
|