Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36761 closed defect (bug) (fixed)

Second parameter missing in some `'default_option_' . $option` filters

Reported by: dlh's profile dlh Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.4
Component: Options, Meta APIs Keywords:
Focuses: Cc:


$option was added as the second parameter to the 'default_option_' . $option filter in 4.4, but it is not included with the filter as applied in add_option() or update_option(). Hooks that accept both arguments can generate a "missing argument" warning when they are called from those functions.

Patch attached to attempt to fix the issue.

Attachments (1)

36761.patch (1.0 KB) - added by dlh 8 years ago.

Download all attachments as: .zip

Change History (3)

8 years ago

#1 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.6

#2 @SergeyBiryukov
8 years ago

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

In 37367:

Options: After [33738], consistently pass option name as the second parameter to the 'default_option_' . $option filter in add_option() and update_option().

Props dlh.
Fixes #36761.

Note: See TracTickets for help on using tickets.