Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#24108 closed defect (bug) (duplicate)

delete_option() does not handle blank $option values

Reported by: jsmoriss Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: General Keywords:
Focuses: Cc:


Both add_option() and update_option() use the following before calling wp_protect_special_option(), but delete_option() does not:

$option = trim($option);
if ( empty($option) )
    return false;

    wp_protect_special_option( $option );

I would suggest adding it delete_option() so it can handle blank $option values more elegantly.

Attachments (1)

option.php.patch (371 bytes) - added by jsmoriss 5 years ago.

Download all attachments as: .zip

Change History (2)

5 years ago

#1 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23289.

Note: See TracTickets for help on using tickets.