From be718ee8603cce8d95502d4cc0cdf06539a99ea7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 17 Jul 2014 22:01:14 +0000 Subject: [PATCH] Declare the variable before using it. props danielbachhuber. fixes #28932. Built from https://develop.svn.wordpress.org/trunk@29215 git-svn-id: http://core.svn.wordpress.org/trunk@28999 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index cecdd00e7a..440a787307 100644 --- a/wp-admin/includes/media.php +++ b/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.