Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm getting
Fatal error: Declaration of EntityReference_SelectionHandler_Views::getInstance() must be compatible with that of EntityReference_SelectionHandler::getInstance()
I'm not sure whether this might be related to PHP 5.3 or something else in our configuration but when i update the method signature from
public static function getInstance($field, $instance)
to
public static function getInstance($field, $instance = NULL, $entity_type = NULL, $entity = NULL)
The error goes away. I don't know how bad an idea it is to make the $instance optional, so please advise. Patch follows.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1570524-entityreference-getinstance_signature-2.patch | 736 bytes | thimothoeye |
#1 | 1570524-entityreference-getinstance_signature-1.patch | 952 bytes | thimothoeye |
Comments
Comment #1
thimothoeye CreditAttribution: thimothoeye commentedComment #3
thimothoeye CreditAttribution: thimothoeye commentedSorry, faulty patch. Working with git submodules can be a real PITA :)
Comment #4
thimothoeye CreditAttribution: thimothoeye commentedComment #5
tim.plunkettLooks good to me.
Comment #6
amitaibuThanks, committed.