The attachment is corrupt. It contains no attachment data, or no attachment data that can be recovered, hence the undefined indexes. Undefined indexes are generally expected for corrupt data. In this case the attachment exists but there is no information about the upload or its file contents, so really it is a useless attachment and should be removed.
If we are looking for any bugs, it might be to explain why the data is corrupted in the first place, but you must first upgrade to a supported version. 4.0.24 has already reached its end-of-life. If you can create new content that exhibits the same behavior after upgrading, please open a report with a description of how the content was created, along with any error messages that occurred while creating the content.