WordPress.org

Make WordPress Core

Ticket #16030: 16030.diff

File 16030.diff, 534 bytes (added by cyberhobo, 3 years ago)

Quick fix for the symptom - not sure if there are deeper issues to consider.

  • wp-admin/includes/post.php

     
    715715        $mid = (int) $mid; 
    716716 
    717717        $meta = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); 
    718         if ( is_serialized_string( $meta->meta_value ) ) 
     718        if ( $meta && is_serialized_string( $meta->meta_value ) ) 
    719719                $meta->meta_value = maybe_unserialize( $meta->meta_value ); 
    720720        return $meta; 
    721721}