Closed sheldonrampton closed 7 years ago
These notices are happening because the file_entity_file_get_mimetype_type() function in the file_entity module tries to explode a string which it expects to contain a slash, such as "application/pdf", but the string passed to the function is something such as "pdf" without a slash. I've filed a bug report and a patch that fixes the PHP notices on Drupal.org:
https://www.drupal.org/node/2700235
I don't know if this is the best way to fix this issue. It would be better if whatever is passing the string into the file_entity_file_get_mimetype_type function passed in a better mimetype string.
Description
When adding a "Link to a file" resource to a dataset, you may encounter a PHP warning notice that says, "Notice: Undefined offset: 1 in file_entity_file_get_mimetype_type() (line 2465 of sites/all/modules/contrib/file_entity/file_entity.module".
This error only occurs when adding a resource for the first time to the website. If the resource has been added previously, the warning notice does not appear.
This has been documented in DKAN 7.x-1.11.
Steps to Reproduce
Acceptance Criteria
Ticket Reference
CIVIC-2068