php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72647 xmlrpc_encode() unexpected output after referencing array elements
Submitted: 2016-07-22 13:29 UTC Modified: -
From: rend at bit dot nl Assigned:
Status: Closed Package: XMLRPC-EPI related
PHP Version: 7.1Git-2016-07-22 (Git) OS: Linux Mint 18 Sarah
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rend at bit dot nl
New email:
PHP Version: OS:

 

 [2016-07-22 13:29 UTC] 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>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-22 15:15 UTC] laruence@php.net
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)
 [2016-07-22 15:15 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-22 15:16 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=516837344e5de91e2524d503a3f91c4bd9c8dadd
Log: Fixed bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
 [2016-10-17 10:10 UTC] bwoebi@php.net
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)
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=516837344e5de91e2524d503a3f91c4bd9c8dadd
Log: Fixed bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC