It's not a big deal, but it's a bit pesky of a PHP warning. It seems like the redhen_relation module wants to add the ability to give a custom title for relations that contain two redhen entities.

The issue is that in checking if both endpoints are in fact redhen entities, it assumes that all relations are going to have two endpoints. In our case we have relations that have a minimum arity of 1. (by design)

I think a simple check to make sure the arity != 1, and that both are redhen entities should work.

if (!in_array($endpoints[0]['entity_type'], $redhen_entities) || !in_array($endpoints[1]['entity_type'], $redhen_entities)) {
if ($relation->arity == 1 || !in_array($endpoints[0]['entity_type'], $redhen_entities) || !in_array($endpoints[1]['entity_type'], $redhen_entities)) {
CommentFileSizeAuthor
#2 2901058.patch783 bytesasherry
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

asherry created an issue. See original summary.

asherry’s picture

Status: Active » Needs review
FileSize
783 bytes

here is a pretty small patch for this

asherry’s picture

Assigned: asherry » Unassigned