Index: src/wp-includes/media.php
===================================================================
--- src/wp-includes/media.php	(revision 34919)
+++ src/wp-includes/media.php	(working copy)
@@ -1000,7 +1000,7 @@
 	}
 
 	// Bail early if $image_width isn't set.
-	if ( ! $img_width ) {
+	if ( ! isset( $img_width ) || ! $img_width ) {
 		return false;
 	}
 
