Avoid notice.
git-svn-id: https://develop.svn.wordpress.org/trunk@17223 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b9d0f9fd0b
commit
b27d7ad9b0
@ -715,6 +715,8 @@ function get_post_meta_by_id( $mid ) {
|
||||
$mid = (int) $mid;
|
||||
|
||||
$meta = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE meta_id = %d", $mid) );
|
||||
if ( empty($meta) )
|
||||
return false;
|
||||
if ( is_serialized_string( $meta->meta_value ) )
|
||||
$meta->meta_value = maybe_unserialize( $meta->meta_value );
|
||||
return $meta;
|
||||
|
Loading…
x
Reference in New Issue
Block a user