[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 01:53:51 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: needs-unit-tests needs-patch | Focuses:
------------------------------------------+-----------------------------
Changes (by peterwilsoncc):
* keywords: has-patch has-unit-tests commit => needs-unit-tests needs-
patch
* status: closed => reopened
* resolution: fixed =>
Comment:
Reopening, PHP7 doesn't cope with protocol relative URLs in some
circumstances.
This will need a dedicated test case in
`Tests_HTTP_HTTP::parse_url_testcases` as it's only coincidence that
caught it.
{{{
$ php -v
PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS )
$ wp eval 'var_dump( wp_parse_url(
"//fonts.googleapis.com/css?family=Open+Sans:400&subset=latin" ) );'
array(2) {
["path"]=>
string(26) "//fonts.googleapis.com/css"
["query"]=>
string(33) "family=Open+Sans:400&subset=latin"
}
$ wp eval 'var_dump( wp_parse_url(
"//fonts.googleapis.com/css/family/Open/Sans/400/subset/latin" ) );'
array(2) {
["host"]=>
string(20) "fonts.googleapis.com"
["path"]=>
string(38) "/css/family/Open/Sans/400/subset/latin"
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36356#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list