Version of php? 7.2 right?
I remember similar reports for other places, I don't remember if this one was reported yet.
You can replace any instance of:
count($modSettings['attachmentUploadDir']) == 1
with:
(is_array($modSettings['attachmentUploadDir']) && count($modSettings['attachmentUploadDir']) == 1)
in /sources/admin/ManageAttachments.controller.php