Error when updating non-image attachemnt in admin

To reproduce:

Upload pdf file to WP.
Go to pdf in media library
click update
Get errors.