k.schroeder                              Sat, 17 Jul 2010 21:26:01 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=301354

Log:
Test for #52359

Bug: http://bugs.php.net/52359 (Open) http_build_query seem to encode array 
incorrectly
      
Changed paths:
    A   php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug52359.phpt

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug52359.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug52359.phpt          
                (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug52359.phpt  
2010-07-17 21:26:01 UTC (rev 301354)
@@ -0,0 +1,21 @@
+--TEST--
+Bug #52359 (http_build_query seem to encode array incorrectly)
+--FILE--
+<?php
+$a = array(
+    'foo/bar' => array(
+        '1',
+        '2'
+    ),
+    'bar' => 'foo'
+);
+
+$b = http_build_query($a, NULL, '&');
+var_dump($b);
+
+$c = urldecode($b);
+var_dump($c);
+?>
+--EXPECTF--
+string(43) "foo%2Fbar%5B%5D=1&foo%2Fbar%5B%5D=2&bar=foo"
+string(31) "foo/bar[]=1&foo/bar[]=2&bar=foo"
\ No newline at end of file


Property changes on: 
php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug52359.phpt
___________________________________________________________________
Added: svn:keywords
   + Id Rev Revision Date LastChangedDate LastChangedRevision Author 
LastChangedBy HeadURL URL
Added: svn:eol-style
   + native

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to