Make sure attachment meta data is an array. Props nbachiyski. fixes #7252
git-svn-id: http://svn.automattic.com/wordpress/trunk@8261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e455091d0a
commit
cc829f5f96
|
@ -274,7 +274,7 @@ function image_make_intermediate_size($file, $width, $height, $crop=false) {
|
|||
}
|
||||
|
||||
function image_get_intermediate_size($post_id, $size='thumbnail') {
|
||||
if ( !$imagedata = wp_get_attachment_metadata( $post_id ) )
|
||||
if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) )
|
||||
return false;
|
||||
|
||||
// get the best one for a specified set of dimensions
|
||||
|
|
|
@ -2424,7 +2424,7 @@ function wp_get_attachment_thumb_file( $post_id = 0 ) {
|
|||
$post_id = (int) $post_id;
|
||||
if ( !$post =& get_post( $post_id ) )
|
||||
return false;
|
||||
if ( !$imagedata = wp_get_attachment_metadata( $post->ID ) )
|
||||
if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
|
||||
return false;
|
||||
|
||||
$file = get_attached_file( $post->ID );
|
||||
|
|
Loading…
Reference in New Issue