[PEAR-BUG] Req #20427 [Ver->Csd]: Option to not add numeric array keys in URL

[email protected] Sat, 18 Oct 2014 10:59:11 +0100 (BST)
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at https://pear.php.net/bugs/bug.php?id=20427&edit=1

 ID:               20427
 Updated by:       [email protected]
 Reported By:      cweiske at php dot net
 Summary:          Option to not add numeric array keys in URL
-Status:           Verified
+Status:           Closed
 Type:             Feature/Change Request
 Package:          Net_URL2
 Package Version:  2.0.10
 PHP Version:      Irrelevant
 Assigned To:      tkli
 Roadmap Versions: 
 New Comment:

-Status: Verified
+Status: Closed
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pear.php.net/get/




Previous Comments:
------------------------------------------------------------------------

[2014-10-17 06:38:34] cweiske

-Status: Feedback
+Status: Verified
Yes, this option would be fine.

------------------------------------------------------------------------

[2014-10-17 02:44:26] tkli

-Status: Assigned
+Status: Feedback


------------------------------------------------------------------------

[2014-10-17 02:43:12] tkli

this can be done as a two line change for auto-detecting zero-based
sequences.

as auto-detecting it would modify the current behaviour, but as far as
parsing the query-info part 
parsing like PHP does is concerned, this wouldn't make a difference.

I suggest to not introduce an option but just change the behaviour.

an option would be naturally possible, too.

I suggest OPTION_DROP_SEQUENCE default being TRUE. When set to FALSE the
previous behaviour 
can be re-established.

------------------------------------------------------------------------

[2014-10-17 02:16:55] tkli

-Assigned To:
+Assigned To: tkli


------------------------------------------------------------------------

[2014-10-17 02:16:42] tkli

This should be equally the same in PHP, shouldn't it? So perhaps the
current behaviour could even 
qualify as a bug?

In review of 

    $url = new Net_URL2('http://example.org/?foo[]=bar&foo[]=baz');
    $variables = $url->getQueryVariables();

this is even inconsistent.

As you ask for an option - are you looking for an option passed in the
ctor array (which name would 
you suggest?) or for a flag you pass as an additional parameter to
Net_URL2::setQueryVariables?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=20427

-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20427&edit=1