Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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)) {
Comment | File | Size | Author |
---|---|---|---|
#2 | 2901058.patch | 783 bytes | asherry |
Comments
Comment #2
asherry CreditAttribution: asherry commentedhere is a pretty small patch for this
Comment #3
asherry CreditAttribution: asherry commented