From 332a6182712d10724bfc28c4b2bdecbdec4fa7f0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 17 Jul 2014 22:00:14 +0000 Subject: [PATCH] Declare the variable before using it. props danielbachhuber. fixes #28932. git-svn-id: https://develop.svn.wordpress.org/trunk@29215 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/media.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index cecdd00e7a..440a787307 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -811,6 +811,7 @@ function media_sideload_image( $file, $post_id, $desc = null ) { if ( ! empty( $file ) ) { // Set variables for storage, fix file filename for query strings. preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches ); + $file_array = array(); $file_array['name'] = basename( $matches[0] ); // Download file to temp location.