WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#32350 closed defect (bug) (fixed)

Sanitize_Option needs to be able to handle a WP Error Object

Reported by: chriscct7 Owned by: wonderboymusic
Milestone: 4.2.3 Priority: normal
Severity: normal Version: 4.2
Component: Formatting Keywords: has-patch fixed-major
Focuses: Cc:

Description (last modified by chriscct7)

As discovered in #32212, sanitize_option cannot currently handle a WP Error Object being returned. This patch solves that problem. Related #32351

Attachments (2)

32308.1.patch (7.8 KB) - added by chriscct7 2 years ago.
32350.diff (7.2 KB) - added by wonderboymusic 2 years ago.

Download all attachments as: .zip

Change History (10)

@chriscct7
2 years ago

#1 @chriscct7
2 years ago

  • Owner set to chriscct7
  • Status changed from new to assigned

#2 @chriscct7
2 years ago

  • Status changed from assigned to accepted

#3 @chriscct7
2 years ago

  • Description modified (diff)

@wonderboymusic
2 years ago

#4 @wonderboymusic
2 years ago

  • Owner changed from chriscct7 to wonderboymusic
  • Status changed from accepted to assigned

#5 @wonderboymusic
2 years ago

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

In 32791:

sanitize_option() needs to handle WP_Error. DRY the conditional calls to add_settings_error().

Props chriscct7 for an initial patch.
Fixes #32350.

#6 @wonderboymusic
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 4.2.3 consideration

#7 @samuelsidler
2 years ago

  • Keywords fixed-major added

#8 @pento
2 years ago

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

In 33326:

sanitize_option() needs to handle WP_Error. DRY the conditional calls to add_settings_error().

Merge of [32791] to the 4.2 branch.

Props wonderboymusic, chriscct7 for an initial patch.

Fixes #32350.

Note: See TracTickets for help on using tickets.