fix #11
authorMichael Wallner <mike@php.net>
Mon, 31 Aug 2015 08:00:47 +0000 (10:00 +0200)
committerMichael Wallner <mike@php.net>
Mon, 31 Aug 2015 08:00:47 +0000 (10:00 +0200)
the pointer to update was not reset

tests/gh-issue11.phpt [new file with mode: 0644]

diff --git a/tests/gh-issue11.phpt b/tests/gh-issue11.phpt
new file mode 100644 (file)
index 0000000..aba014a
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+crash when query string has nested array keys
+--SKIPIF--
+<?php
+include "skipif.inc";
+php_version_compare(PHP_VERSION, "7.0.0-dev") or die("skip php<7");
+?>
+--FILE--
+<?php
+
+echo "Test\n";
+
+$q = new http\QueryString("a[0][0]=x&a[1][0]=x");
+printf("%s\n", $q);
+
+?>
+===DONE===
+--EXPECT--
+Test
+a%5B0%5D%5B0%5D=x&a%5B1%5D%5B0%5D=x
+===DONE===