Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11820 closed defect (bug) (fixed)

'colors' meta-css src (boolean) generates parse_url errors in _css_href

Reported by: janfabry's profile janfabry Owned by: azaozz's profile azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.1
Component: General Keywords:
Focuses: Cc:

Description

The admin color stylesheet is a meta stylesheet with the boolean true as the src value. This can lead to invalid urls in 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 _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 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.

Change History (3)

#1 @ryan
15 years ago

  • Milestone changed from Unassigned to 3.0
  • Owner set to azaozz
  • Status changed from new to assigned

#2 @azaozz
15 years ago

Changing the default src value of the meta colors stylesheet to false or (empty string) would stop it from working. Perhaps it's better to test for boolean in _css_href() in class.wp-styles.php.

#3 @azaozz
15 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13193]) Fix the 'colors' meta-css src (boolean) value generating parse_url errors, fixes #11820

Note: See TracTickets for help on using tickets.