From b7a4314cbc42a47951b99f204fd9ebd032e87585 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 10 Dec 2012 22:58:28 +0000 Subject: [PATCH] Ignore failed uploads. props koopersmith. fixes #22849 git-svn-id: https://develop.svn.wordpress.org/trunk@23162 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/plupload/wp-plupload.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/js/plupload/wp-plupload.js b/wp-includes/js/plupload/wp-plupload.js index 86a1919f47..dc91674930 100644 --- a/wp-includes/js/plupload/wp-plupload.js +++ b/wp-includes/js/plupload/wp-plupload.js @@ -150,6 +150,10 @@ window.wp = window.wp || {}; _.each( files, function( file ) { var attributes, image; + // Ignore failed uploads. + if ( plupload.FAILED === file.status ) + return; + // Generate attributes for a new `Attachment` model. attributes = _.extend({ file: file,