Skip to content

Commit 1a343b0

Browse files
committed
Fix location for declaring vars
1 parent 6378984 commit 1a343b0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-includes/media.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,9 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon
978978
// Get a thumbnail or intermediate image if there is one.
979979
$image = image_downsize( $attachment_id, $size );
980980
if ( ! $image ) {
981-
$src = false;
981+
$src = false;
982+
$width = 0;
983+
$height = 0;
982984

983985
if ( $icon ) {
984986
$src = wp_mime_type_icon( $attachment_id, '.svg' );
@@ -988,8 +990,6 @@ function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon
988990
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
989991

990992
$src_file = $icon_dir . '/' . wp_basename( $src );
991-
$width = 0;
992-
$height = 0;
993993

994994
$image_size = wp_getimagesize( $src_file );
995995
if ( is_array( $image_size ) ) {

0 commit comments

Comments
 (0)