|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-24 18:29 UTC] jon at phpsitesolutions dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 19:00:01 2025 UTC |
Description: ------------ When using http_build_query, passing an empty 3rd parameter results in no separator being used in the resulting output. This is incorrect, as the documentation page specifies that 'arg_separator.output' will be used in the event that the 3rd parameter is empty. To fix this issue in my scripts, I've had to explicitly define the separator to use, using: $sep = ini_get('arg_separator.output'); Reproduce code: --------------- <?php $query_string = 'mode=order_message&orderids=5048'; parse_str(html_entity_decode($qs), $query_string); $var = http_build_query($query_string); echo $var; ?> Expected result: ---------------- 'mode=order_message&orderids=5048' Actual result: -------------- 'mode=order_messageorderids%3D5048'