Fixed PHP error in case a file with no extension has been uploaded.