Avoid notice.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-01-05 18:18:31 +00:00
parent 694e3e9bf3
commit bfee572698
1 changed files with 2 additions and 0 deletions

View File

@ -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;