summaryrefslogtreecommitdiff
path: root/ext/xmlrpc/tests
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-07-22 23:13:42 +0800
committerXinchen Hui <laruence@gmail.com>2016-07-22 23:13:42 +0800
commit516837344e5de91e2524d503a3f91c4bd9c8dadd (patch)
tree06b63dbab122449f0645a779d4c22ddea0c09905 /ext/xmlrpc/tests
parent9a2207c90ae1c699d9e34223f51b6c13dfbda798 (diff)
downloadphp-git-516837344e5de91e2524d503a3f91c4bd9c8dadd.tar.gz
Fixed bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
Diffstat (limited to 'ext/xmlrpc/tests')
-rw-r--r--ext/xmlrpc/tests/bug72647.phpt36
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/xmlrpc/tests/bug72647.phpt b/ext/xmlrpc/tests/bug72647.phpt
new file mode 100644
index 0000000000..9334cbda51
--- /dev/null
+++ b/ext/xmlrpc/tests/bug72647.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #72647 (xmlrpc_encode() unexpected output after referencing array elements)
+--SKIPIF--
+<?php
+if (!extension_loaded("xmlrpc")) print "skip";
+?>
+--FILE--
+<?php
+
+$ar = array(4, "a", 7);
+$v = &$ar[1];
+unset($v);
+
+echo xmlrpc_encode($ar);
+?>
+--EXPECTF--
+<?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>