Because of other modules I have found that sometimes the method $view_entity = $view->display_handler->get_option('entity_type'); can return NULL / FALSE. Causing errors and Notices, especially in eva_field_extra_fields();

EG:

Warning: array_keys() expects parameter 1 to be array, null given in eva_field_extra_fields() (line 34 of /sites/all/modules/common/eva/eva.module).

Warning: Invalid argument supplied for foreach() in eva_field_extra_fields() (line 36 of /sites/all/modules/common/eva/eva.module).

The attached patch mitigates this.

CommentFileSizeAuthor
eva-handle-empty-options.patch1.76 KBNaX
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geek-merlin’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hmm, this looks like it only covers a bug from another module. Can you provide a minimal setup to reproduce this and a PBT backtrace?