Form not working in Safari if not attaching the optional file to it

I’ve noticed that in Safari, the form gives an error when submitting if the user does not attach a file.

The user is not able to send the form if he/she is not attaching a file to it. All works if user selects a file to upload. If user doesn't not select a file it gives error "An error occurred processing the form. Please try again". File upload is configured to be optional.

Works in Firefox and Chrome, but not in Safari.