Attachment medata can evaluate as truth, but still be corrupted
|Reported by:||nbachiyski||Owned by:|
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.