After [45538]: fix a WPCS fix and make couple of var names consistent.

See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45539 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2019-06-15 01:31:07 +00:00
parent ca84ae5030
commit cd86b07108
2 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -235,7 +235,11 @@ function image_downsize( $id, $size = 'medium' ) {
} elseif ( $size === 'thumbnail' ) {
// fall back to the old thumbnail
$thumb_file = wp_get_attachment_thumb_file( $id );
$info = getimagesize( $thumb_file );
$info = null;
if ( $thumb_file ) {
$info = getimagesize( $thumb_file );
}
if ( $thumb_file && $info ) {
$img_url = str_replace( $img_url_basename, wp_basename( $thumb_file ), $img_url );