[wp-trac] [WordPress Trac] #36356: Function signature of wp_parse_url() does not match parse_url()

WordPress Trac noreply at wordpress.org
Sat Oct 1 09:35:38 UTC 2016


#36356: Function signature of wp_parse_url() does not match parse_url()
--------------------------------------+-----------------------------
 Reporter:  johnbillion               |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.7
Component:  HTTP API                  |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Changes (by jrf):

 * keywords:  needs-unit-tests needs-patch => has-patch has-unit-tests


Comment:

 Sometimes PHP just drives me up the wall....

 @peterwilsoncc Thanks for the additional test cases. I've fixed the
 handling of these.

 I've also come up with two more test cases which previously weren't
 handled at all:

 {{{
 http://www.test.com/path1/path2/&q=a
 http://www.test.com/path1/path2/file.php&q=a
 }}}


 PHP would return an empty `query` for these and have the `&q=a` part
 within the `path`.

 Both @peterwilsoncc's as well my own additional test cases are now handled
 correctly cross-version PHP 5.2 - 7.1 + HHVM by the additional patch which
 I just uploaded.

 The patch includes two new internal functions to prevent code duplication.
 The patch includes updated documentation to reflect the changes.

 The second patch I've uploaded contains perfunctory unit tests for the new
 functions I introduced.

 A travis build which covers the groups which contain the `http` tests as
 well as the `template` tests which contained the Google URLs (now also
 added to the `http` tests) passes on the combination of the two new
 patches (fix + additional tests): https://travis-
 ci.org/jrfnl/develop.wordpress/builds/164235958

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36356#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list