The following error displayed after creating an entity reference field on a custom content type and then trying to add or edit content for that content type:

Notice: Undefined property: stdClass::$uri in file_entity_file_entity_access() (line 1733 of /home/xyz/d7/sites/all/modules/file_entity/file_entity.module).

Also got the error mentioned in previous issue https://www.drupal.org/node/2312603 so was able to patch that one.

Comments

ronnienorwood created an issue. See original summary.

ronnienorwood’s picture

Issue summary: View changes
gopisathya’s picture

Can this work? Not tested though

if (is_object($file) && isset($file->uri) && !file_valid_uri($file->uri)) {
    return FILE_ENTITY_ACCESS_DENY;
  }