Bug #72647 [NEW]: xmlrpc_encode() unexpected output after referencing array elements

From: Date: Fri, 22 Jul 2016 13:29:23 +0000
Subject: Bug #72647 [NEW]: xmlrpc_encode() unexpected output after referencing array elements
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202503@lists.php.net to get a copy of this message
From: rend at bit dot nl Operating system: Linux Mint 18 Sarah PHP version: 7.1Git-2016-07-22 (Git) Package: XMLRPC-EPI related Bug Type: Bug Bug description:xmlrpc_encode() unexpected output after referencing array elements 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 bug report at https://bugs.php.net/bug.php?id=72647&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72647&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72647&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72647&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72647&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72647&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72647&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72647&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72647&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72647&r=support Expected behavior: https://bugs.php.net/fix.php?id=72647&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72647&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72647&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72647&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72647&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72647&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72647&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72647&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72647&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72647&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72647&r=mysqlcfg

« previous php.bugs (#202503) next »