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
The uploader inserts the file name directly into the page at the moment without
handling any HTML special chars that may be in the name. This results in HTML
that may be present getting rendered in error messages and the attachments
list. This simply causes layout breakage for the user, since the backend takes
care of sanitizing the name. Once phpBB returns the file data for the uploaded
file, the name in the attachment list gets replaced by the one that phpBB
provides.
PHPBB3-12212
The hidden attachment_data list needs to be updated if a file got removed.
This was not done until now and caused a general error after submitting a
post if a file was removed after uploading it.
PHPBB3-11916