Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#4571 closed defect (bug) (fixed)

broken option values after saving

Reported by: m0n5t3r's profile m0n5t3r Owned by: markjaquith's profile markjaquith
Milestone: 2.3 Priority: high
Severity: major Version: 2.3
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

options.php calls trim and stripslashes on option values submitted from options pages.

When one of the values is an array, this breaks it and update_option saves the string "Array" in the database, which is, most of the times, not what the (plugin) options page author intended.

Attachments (2)

fix_option_parsing.diff (2.1 KB) - added by m0n5t3r 18 years ago.
patch to address the issue
4571.diff (517 bytes) - added by Nazgul 18 years ago.

Download all attachments as: .zip

Change History (5)

@m0n5t3r
18 years ago

patch to address the issue

#1 @markjaquith
18 years ago

  • Keywords needs-patch added; has-patch needs-testing 2nd-opinion removed
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned
  • Version set to 2.3

see stripslashes_deep() We don't need to be trimming within the array.

@Nazgul
18 years ago

#2 @Nazgul
18 years ago

  • Keywords has-patch added; needs-patch removed

New patch attached.

#3 @ryan
17 years ago

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

(In [5886]) Don't trim option arrays on save. Props m0n5t3r, Nazgul. fixes #4571

Note: See TracTickets for help on using tickets.