Opened 17 years ago
Closed 17 years ago
#7252 closed defect (bug) (fixed)
Attachment medata can evaluate as truth, but still be corrupted
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
At two places in the code there are checks like:
if ( !$imagedata = wp_get_attachment_metadata( $post_id ) )
which if satisfied expect $imagedata
to be an array. But if there is non-unserializable value in the postmeta table it will be returned as a string, which will break the code after the check.
Here is patch, which uses is_array()
instead.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [8261]) Make sure attachment meta data is an array. Props nbachiyski. fixes #7252