Skip to content

Commit 2ea5a9c

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 97dd159 + 8e34de4 commit 2ea5a9c

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ PHP NEWS
4343
- Standard:
4444
. Fixed bug #77552 (Unintialized php_stream_statbuf in stat functions).
4545
(John Stevenson)
46+
. Fixed bug #77608 (http_build_query doesn't encode "+" in a float number).
47+
(Nikita)
4648

4749
07 Feb 2019, PHP 7.3.2
4850

ext/standard/http.c

-9
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,6 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
190190
case IS_TRUE:
191191
smart_str_appendl(formstr, "1", sizeof("1")-1);
192192
break;
193-
case IS_DOUBLE:
194-
{
195-
char *ekey;
196-
size_t ekey_len;
197-
ekey_len = spprintf(&ekey, 0, "%.*G", (int) EG(precision), Z_DVAL_P(zdata));
198-
smart_str_appendl(formstr, ekey, ekey_len);
199-
efree(ekey);
200-
}
201-
break;
202193
default:
203194
{
204195
zend_string *ekey;
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--TEST--
2+
Bug #77608: http_build_query doesn't encode "+" in a float number
3+
--FILE--
4+
<?php
5+
6+
$a = ["x" => 1E+14, "y" => "1E+14"];
7+
echo http_build_query($a);
8+
9+
?>
10+
--EXPECT--
11+
x=1.0E%2B14&y=1E%2B14

0 commit comments

Comments
 (0)