So I made a bit of an mistake and accidentally deleted some uploaded files via FTP. In the backend, when I try to remove the missing files from the node itself, it presents an error "The website encountered an unexpected error. Please try again later." Upon checking the error logs it says:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1384489746 ) in drupal_write_record() (line 7166 of /Applications/MAMP/htdocs/fung/includes/common.inc).
Any ideas how to fix this?