Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22358 closed enhancement (fixed)

Trim option names before pre filtering them

Reported by: evansolomon's profile evansolomon Owned by: nacin's profile nacin
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

In get_option() we trim() the option name before looking up its value, but after the pre_option_$option filter runs. I think it makes more sense for the trim() to be done before anything else, and I can't think of a use case for 'foo ' and 'foo' getting different pre_option_$option treatments.

Attachments (1)

22358.patch (616 bytes) - added by evansolomon 12 years ago.

Download all attachments as: .zip

Change History (3)

@evansolomon
12 years ago

#1 @nacin
12 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.5

#2 @nacin
12 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 22633:

Trim the option name in get_option() before calling the pre_option_$option filter, not after. props evansolomon. fixes #22358.

Note: See TracTickets for help on using tickets.