mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
Merge branch 'PHP-5.4'
This commit is contained in:
commit
cc1caf92ea
@ -918,7 +918,7 @@ static PHP_FUNCTION(libxml_set_streams_context)
|
||||
{
|
||||
zval *arg;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
if (LIBXML(stream_context)) {
|
||||
|
@ -27,26 +27,26 @@ echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line 10
|
||||
NULL
|
||||
Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line %d
|
||||
|
||||
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
|
||||
Warning: libxml_set_streams_context() expects parameter 1 to be resource, null given in %s004.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
|
||||
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
|
||||
Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %s004.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
|
||||
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
|
||||
Warning: libxml_set_streams_context() expects parameter 1 to be resource, integer given in %s004.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
|
||||
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
|
||||
Warning: libxml_set_streams_context() expects parameter 1 to be resource, object given in %s004.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
|
||||
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
|
||||
Warning: libxml_set_streams_context() expects parameter 1 to be resource, array given in %s004.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
NULL
|
||||
bool(true)
|
||||
|
14
ext/libxml/tests/bug63389.phpt
Normal file
14
ext/libxml/tests/bug63389.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--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
|
Loading…
Reference in New Issue
Block a user