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

WordPress Trac noreply at wordpress.org
Tue Oct 4 20:34:38 UTC 2016


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

Comment (by jrf):

 > I've added the check before unsetting.

 Except you are returning `$parts` early in that case which will give
 issues when a `$component` has been requested (in that case, they would
 expect null, not false as a return).

 Either return using `_get_component_from_parsed_url_array( $parts,
 $component ); ` or wrap the `foreach()` in the `false` check like I
 suggested.

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


More information about the wp-trac mailing list