|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77608 http_build_query doesn't encode "+" in a float number
Submitted: 2019-02-12 04:48 UTC Modified: 2019-02-12 10:22 UTC
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: wxiaoguang at gmail dot com Assigned: nikic (profile)
Status: Closed Package: *URL Functions
PHP Version: 7.2.15 OS:
Private report: No CVE-ID: None
 [2019-02-12 04:48 UTC] wxiaoguang at gmail dot com
http_build_query doesn't encode "+" in a float number (eg: 1E+14)

The "+" should be encoded to "%2B" in the output.

Test script:
echo http_build_query($a);

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-12 09:45 UTC]
-Assigned To: +Assigned To: nikic
 [2019-02-12 09:51 UTC]
Automatic comment on behalf of
Log: Fixed bug #77608
 [2019-02-12 09:51 UTC]
-Status: Assigned +Status: Closed
 [2019-02-12 10:10 UTC] wxiaoguang at gmail dot com
I think this bug also affects other (all) php versions.

Will all verions of PHP get this bug fix?
 [2019-02-12 10:22 UTC]
The bug fix is in PHP 7.2, PHP 7.3 and current development branches. Older versions of PHP are no longer actively supported.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Jun 04 20:03:40 2023 UTC