[wp-trac] [WordPress Trac] #11820: 'colors' meta-css src (boolean) generates parse_url errors in _css_href

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 09:02:54 UTC 2010


#11820: 'colors' meta-css src (boolean) generates parse_url errors in _css_href
--------------------------+-------------------------------------------------
 Reporter:  janfabry      |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.9.1     
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 The admin color stylesheet is a meta stylesheet with the boolean
 {{{true}}} as the {{{src}}} value. This can lead to invalid urls in
 [source:tags/2.9.1/wp-includes/class.wp-styles.php#L98
 Wp_Styles::_css_href] when the base url has a port number with 5 digits
 (10000 and above).

 In my case, the {{{home}}} and {{{siteurl}}} values are set to
 {{{http://localhost:45000/}}} (the error occurs with and without a
 trailing slash, it seems this is stripped). Since the value of {{{src}}}
 is appended to the base url in [source:tags/2.9.1/wp-includes/class.wp-
 styles.php#L100 _css_href], and a boolean {{{true}}} becomes {{{'1'}}}
 when appended to a string, this results in the {{{src}}} value
 {{{http://localhost:450001}}}, which leads to errors later in
 [source:tags/2.9.1/wp-includes/script-loader.php#L530 wp_style_loader_src]
 when this invalid temporary url is stripped (by {{{parse_url}}}) to create
 the actual url.

 My solution is to change the default src value of the meta colors
 stylesheet to {{{false}}} or {{{'/'}}}, or some other harmless value.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11820>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list