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
This commit is contained in:
parent
9730c679f1
commit
332a618271
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user