WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 months ago

#15030 new defect (bug)

Unserialize deep when returning arrays of metadata

Reported by: nacin Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: needs-patch
Focuses: Cc:

Description (last modified by nacin)

Currently when retrieving an array of metadata values for an object (no meta key specialized), they are retrieved as serialized. Only when meta key is specified do we unserialize.

We should array_map( 'maybe_unserialize' ) on what we plan to return instead of forcing plugins to call that themselves.

Attachments (1)

15030.diff (366 bytes) - added by nacin 4 years ago.
Patches get_metadata()

Download all attachments as: .zip

Change History (6)

comment:1 westi4 years ago

  • Keywords needs-patch added

Sounds reasonable.
What is the WP function your going to patch here?

comment:2 nacin4 years ago

  • Description modified (diff)
  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 3.1

nacin4 years ago

Patches get_metadata()

comment:3 nacin3 years ago

  • Keywords needs-patch added; has-patch removed

According to dd32 this patch doesn't go deep enough, and needs to go one level down. Sounds about right.

comment:4 nacin3 years ago

  • Milestone changed from 3.1 to Future Release

comment:5 nacin3 months ago

  • Component changed from General to Options and Meta
Note: See TracTickets for help on using tickets.