Avoid notice.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
694e3e9bf3
commit
bfee572698
|
@ -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…
Reference in New Issue