#50407 [Opn->Bgs]: http_build_query() on empty array

From: Date: Tue, 08 Dec 2009 10:05:04 +0000
Subject: #50407 [Opn->Bgs]: http_build_query() on empty array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-145516@lists.php.net to get a copy of this message
ID: 50407 Updated by: jani@php.net Reported By: php at gimme dot org -Status: Open +Status: Bogus Bug Type: URL related Operating System: Win PHP Version: 5.2.11 New Comment: Not setting is same as setting it empty. No bug. Previous Comments: ------------------------------------------------------------------------ [2009-12-08 08:31:10] php at gimme dot org Description: ------------ http_build_query() ignore the key in array( key => array() ).. Reproduce code: --------------- <?php $param = array( '_COOKIE' => array(), '_HEADER' => array( 'User-Agent' => 'Mozilla...' , ), ); echo http_build_query( $param ); ?> Expected result: ---------------- _COOKIE%5B0%D=&_HEADER%5BUser-Agent%5D=Mozilla... Actual result: -------------- _HEADER%5BUser-Agent%5D=Mozilla... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50407&edit=1

« previous php.bugs (#145516) next »