Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#26479 closed defect (bug) (fixed)

unregister_setting not working

Reported by: cvedovini's profile cvedovini Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.3 Priority: normal
Severity: normal Version: 2.6
Component: Plugins Keywords: has-patch commit 3.9-early
Focuses: administration Cc:

Description (last modified by nofearinc)

The unregister_setting function is not working, there's a bug at line 1743 of the plugin.php file:

$pos = array_search( $option_name, (array) $new_whitelist_options );

should be

$pos = array_search( $option_name, (array) $new_whitelist_options[$option_group] );

Attachments (1)

26479.diff (538 bytes) - added by nofearinc 11 years ago.
update $new_whitelist_options search

Download all attachments as: .zip

Change History (9)

#1 @nofearinc
11 years ago

  • Description modified (diff)
  • Keywords has-patch needs-testing added
  • Version changed from 3.7.1 to 2.6

@nofearinc
11 years ago

update $new_whitelist_options search

#2 @nofearinc
11 years ago

I could confirm the issue and the fix from cvedovini seems to work for me. Uploaded a patch following his change proposal.

#3 @goto10
11 years ago

  • Cc dromsey@… added

#4 @SergeyBiryukov
11 years ago

  • Keywords commit 3.9-early added; needs-testing removed
  • Milestone changed from Awaiting Review to Future Release

Introduced in [8802], modified in [11021].

#5 @nacin
11 years ago

  • Component changed from Plugins to Admin APIs
  • Focuses administration added

#6 @nacin
11 years ago

  • Component changed from Admin APIs to Plugins

Sorry for the noise.

#7 @wonderboymusic
10 years ago

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

In 32905:

In unregister_setting(), search for $option_name in a segment of $new_whitelist_options keyed by $option_group.

Props nofearinc.
Fixes #26479.

#8 @wonderboymusic
10 years ago

  • Milestone changed from Future Release to 4.3
Note: See TracTickets for help on using tickets.