Closed (fixed)
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
10 May 2012 at 09:41 UTC
Updated:
25 May 2012 at 19:30 UTC
Jump to comment: Most recent file
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 commentedComment #3
thimothoeye commentedSorry, faulty patch. Working with git submodules can be a real PITA :)
Comment #4
thimothoeye commentedComment #5
tim.plunkettLooks good to me.
Comment #6
amitaibuThanks, committed.