php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64093 There is a functional difference for the function http_build_query in both 5.2.
Submitted: 2013-01-29 08:20 UTC Modified: 2013-01-30 13:51 UTC
From: phaniapsr at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.21 OS:
Private report: No CVE-ID: None
 [2013-01-29 08:20 UTC] phaniapsr at gmail dot com
Description:
------------
There is a functional difference for the function http_build_query in both 5.2.8 
and 5.3.1

Test script:
---------------
$parameters = array(
			'user_name' =>'phaniapsr@gmail.com',
			'pass_word' =>'ravi@gmail.com'
			);

$reqData = http_build_query($parameters);

The above code sample i have tested in PHP 5.3.1 and PHP 5.2.8.
I got different outputs in each version.

Expected result:
----------------
In PHP 5.3.1 i got:

user_name=phaniapsr%40gmail&pass_word=ravi%40gmail.com


In PHP 5.2.8 i got:

user_name=phaniapsr%40gmail&pass_word=ravi%40gmail.com

Actual result:
--------------
I am expecting both the versions should come with same outputs. In PHP 5.3.1 it 
converted & to & but in 5.2.8 & remain same.

In my view this change should not happen. I mean & should not be converted to 
&. It is creating problem in the CURL usage.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-30 13:51 UTC] cataphract@php.net
-Status: Open +Status: Not a bug
 [2013-01-30 13:51 UTC] cataphract@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 08:01:30 2024 UTC