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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 01:01:31 2024 UTC