php.net |  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
Votes:1
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
Description:
------------
http_build_query doesn't encode "+" in a float number (eg: 1E+14)

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



Test script:
---------------
$a["x"]=1E+14; 
echo http_build_query($a);


Expected result:
----------------
x=1.0E%2B14

Actual result:
--------------
x=1.0E+14

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-12 09:45 UTC] nikic@php.net
-Assigned To: +Assigned To: nikic
 [2019-02-12 09:51 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8e34de475699a4aa0fbc7b8430574b56dc839362
Log: Fixed bug #77608
 [2019-02-12 09:51 UTC] nikic@php.net
-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] nikic@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC