Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24108 closed defect (bug) (duplicate)

delete_option() does not handle blank $option values

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

Description

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 13 years ago.

Download all attachments as: .zip

Change History (2)

#1 @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Duplicate of #23289.

Note: See TracTickets for help on using tickets.