php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47754 array URL returning no parameter separater
Submitted: 2009-03-23 14:30 UTC Modified: 2009-03-24 17:48 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: itawadh at live dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 5.2.9 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: itawadh at live dot com
New email:
PHP Version: OS:

 

 [2009-03-23 14:30 UTC] itawadh at live dot com
Description:
------------
Hi,

We enter a url in xml_parser functions to read and convert xml to php. Everything seems to be working fine.

But, the Array output contains some urls as values (with url_parameters) like http : // abc dot com / 123?ty=243&tt=564 ... etc.

Problem is that, when parsing it, we are getting url as string without the & for parameters (so, the above sample is now http : // abc dot com / 123?ty=243tt=564)<- note here, an & is missing among the 243 and tt.

Please see to it and lemme update on this bug.

Reproduce code:
---------------
(here $xmldata is the xml generated with url : http://publisher.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=MY_API_KEY&trackingId=MY_TRACKING_ID&productId=21267326&offerSortType=price&offerSortOrder=asc&showProductSpecs=true)

	$parser = xml_parser_create ('ISO-8859-1');
	xml_parser_set_option ($parser, XML_OPTION_SKIP_WHITE, 1);
	xml_parser_set_option ($parser, XML_OPTION_CASE_FOLDING, 0);
	if (!xml_parse_into_struct ($parser, $xmldata, $vals, $index)) {
		$xmlreaderror = true;
		echo "error";
	}
	xml_parser_free ($parser);


now if I print the $vals, it has some urls in it that have problems.

Expected result:
----------------
I need the & to appear as parameter separator in URLs returned as array.

Actual result:
--------------
   [11] => Array
        (
            [tag] => sourceURL
            [type] => complete
            [level] => 3
            [value] => http://www999.shopping.com/pixel/noscript?PV_EvnTyp=APPVAPPV_APITSP=03%2F23%2F09_10%3A25%3A18_AMAPPV_DSPRQSID=s7.7b1f10c892d0e6c44bcbAPPV_IMGURL=APPV_LI_LNKINID=8053368APPV_LI_SBMKYW=APPV_MTCTYP=1000APPV_PRTID=144579APPV_BrnID=14305
        )


this [value] us not containing any & in url

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-24 17:48 UTC] itawadh at live dot com
no one answered
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 24 12:01:25 2020 UTC