mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #71996
This commit is contained in:
parent
972302d2f0
commit
8e487aefaa
3 changed files with 26 additions and 0 deletions
4
NEWS
4
NEWS
|
@ -5,6 +5,10 @@ PHP NEWS
|
||||||
- mbstring:
|
- mbstring:
|
||||||
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)
|
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)
|
||||||
|
|
||||||
|
- SOAP:
|
||||||
|
. Fixed bug #71996 (Using references in arrays doesn't work like expected).
|
||||||
|
(Nikita)
|
||||||
|
|
||||||
- Standard:
|
- Standard:
|
||||||
. Fixed bug #71882 (Negative ftruncate() on php://memory exhausts memory).
|
. Fixed bug #71882 (Negative ftruncate() on php://memory exhausts memory).
|
||||||
(cmb)
|
(cmb)
|
||||||
|
|
|
@ -2120,6 +2120,7 @@ static void add_xml_array_elements(xmlNodePtr xmlParam,
|
||||||
if (j >= dims[0]) {
|
if (j >= dims[0]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ZVAL_DEREF(zdata);
|
||||||
if (dimension == 1) {
|
if (dimension == 1) {
|
||||||
if (enc == NULL) {
|
if (enc == NULL) {
|
||||||
xparam = master_to_xml(get_conversion(Z_TYPE_P(zdata)), zdata, style, xmlParam);
|
xparam = master_to_xml(get_conversion(Z_TYPE_P(zdata)), zdata, style, xmlParam);
|
||||||
|
|
21
ext/soap/tests/bug71996.phpt
Normal file
21
ext/soap/tests/bug71996.phpt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #71996: Using references in arrays doesn't work like expected
|
||||||
|
--SKIPIF--
|
||||||
|
<?php require_once('skipif.inc'); ?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$client = new class(null, ['location' => '', 'uri' => 'http://example.org']) extends SoapClient {
|
||||||
|
public function __doRequest($request, $location, $action, $version, $one_way = 0) {
|
||||||
|
echo $request;
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$ref = array("foo");
|
||||||
|
$data = array(&$ref);
|
||||||
|
$client->foo($data);
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://example.org" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:foo><param0 SOAP-ENC:arrayType="SOAP-ENC:Array[1]" xsi:type="SOAP-ENC:Array"><item SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="xsd:string">foo</item></item></param0></ns1:foo></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
Loading…
Add table
Add a link
Reference in a new issue