From 934696766abc5e2facdae74d7c7881c232473b22 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 8 Apr 2014 21:49:15 -0700 Subject: [PATCH] [ticket/12375] Fix broken attachment deletion. The response is already parsed and when running it through parseJSON returned null prior to 1.9. Now there's an actual error thrown, so the function is returning and thus leaving the attachment row intact. PHPBB3-12375 --- phpBB/assets/javascript/plupload.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpBB/assets/javascript/plupload.js b/phpBB/assets/javascript/plupload.js index 3c2fc5c3cb..8ffd452a09 100644 --- a/phpBB/assets/javascript/plupload.js +++ b/phpBB/assets/javascript/plupload.js @@ -253,10 +253,7 @@ phpbb.plupload.deleteFile = function(row, attachId) { }; var done = function(response) { - var json = {}; - try { - json = $.parseJSON(response); - } catch (e) { + if (typeof response !== 'object') { return; }