Bug #77608 [Csd]: http_build_query doesn't encode "+" in a float number

From: Date: Tue, 12 Feb 2019 10:22:15 +0000
Subject: Bug #77608 [Csd]: http_build_query doesn't encode "+" in a float number
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219526@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77608&edit=1

 ID:                 77608
 Updated by:         nikic@php.net
 Reported by:        wxiaoguang at gmail dot com
 Summary:            http_build_query doesn't encode "+" in a float
                     number
 Status:             Closed
 Type:               Bug
 Package:            *URL Functions
 PHP Version:        7.2.15
 Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

The bug fix is in PHP 7.2, PHP 7.3 and current development branches. Older versions of PHP are no
longer actively supported.


Previous Comments:
------------------------------------------------------------------------
[2019-02-12 10:10:25] 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 09:51:07] 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 04:48:18] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77608&edit=1


Thread (4 messages)

« previous php.bugs (#219526) next »