Bug #72647 [Opn->Csd]: xmlrpc_encode() unexpected output after referencing array elements
| From: | laruence@php.net | Date: | Fri, 22 Jul 2016 15:16:00 +0000 |
| Subject: | Bug #72647 [Opn->Csd]: xmlrpc_encode() unexpected output after referencing array elements | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202505@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72647&edit=1
ID: 72647
Updated by: laruence@php.net
Reported by: rend at bit dot nl
Summary: xmlrpc_encode() unexpected output after referencing
array elements
-Status: Open
+Status: Closed
Type: Bug
Package: XMLRPC-EPI related
Operating System: Linux Mint 18 Sarah
PHP Version: 7.1Git-2016-07-22 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=692912142324f52341438b39ffe2a5b9bfdd17d0
Log: Fixed bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
Previous Comments:
------------------------------------------------------------------------
[2016-07-22 13:29:22] rend at bit dot nl
Description:
------------
Putting an array through xmlrpc_encode() after referencing one or more array elements, results in
missing data in the XML output. The referenced elements are excluded.
In this case, the 2nd element of the array ("a") is missing.
Test script:
---------------
<?php
$ar = array(4, "a", 7);
$v = &$ar[1];
unset($v);
echo xmlrpc_encode($ar);
Expected result:
----------------
<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
<value>
<array>
<data>
<value>
<int>4</int>
</value>
<value>
<string>a</string>
</value>
<value>
<int>7</int>
</value>
</data>
</array>
</value>
</param>
</params>
Actual result:
--------------
<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
<value>
<array>
<data>
<value>
<int>4</int>
</value>
<value>
<int>7</int>
</value>
</data>
</array>
</value>
</param>
</params>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72647&edit=1