php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53631 http_build_query return incorrect null query variable php 5.3.3
Submitted: 2010-12-30 02:50 UTC Modified: 2010-12-30 06:30 UTC
From: grade1000 at gmail dot com Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 5.3.4 OS: windows 7 64bit
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: grade1000 at gmail dot com
New email:
PHP Version: OS:

 

 [2010-12-30 02:50 UTC] grade1000 at gmail dot com
Description:
------------
http_build_query return incorrect...

php version is 5.3.3

Test script:
---------------
$link='http://www.domain.com.br/pt/quadrinhos/index.php?pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0';

$tplnk=parse_url($link);parse_str($tplnk[query],$tpq);$tpq[atual]=0;$tpq=http_build_query($tpq);

echo $tpq;

Expected result:
----------------
pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM=&atual=0

Actual result:
--------------
pagina=0&quadrinhos=Z29zdG9zYSBkZW1haXM%3D&atual=0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-30 06:30 UTC] dtajchreber@php.net
-Status: Open +Status: Bogus
 [2010-12-30 06:30 UTC] dtajchreber@php.net
The equals sign is a reserved character under RFC 1738 and http_build_query 
encodes it properly. 

[1] http://tools.ietf.org/html/rfc1738
[2] http://lxr.php.net/opengrok/xref/PHP_5_3/ext/standard/url.c#441
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 22:01:27 2024 UTC