Under certain circumstances, the current implementation of hook_entity_view throws some PHP warnings:

Warning: Invalid argument supplied for foreach() in dfp_entity_view() (line 174 of /modules/dfp/dfp.module).

Furthermore I think it's not really efficient to do that term category calculation on every entity view, even if this feature isn't activated at all (at least if I understood the configuration options correctly).

Attached patch fixes the PHP warning and ads a check if the term category feature is activated.

CommentFileSizeAuthor
dfp_hook_entity_view_improvements.patch1.38 KBmh86

Comments

bleen’s picture

Status: Needs review » Fixed

this is great ... thanks!

Committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.