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

<?php
public static function getInstance($field, $instance)
?>

to

<?php
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.

Files: 
CommentFileSizeAuthor
#3 1570524-entityreference-getinstance_signature-2.patch736 bytesthimothoeye
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]
#1 1570524-entityreference-getinstance_signature-1.patch952 bytesthimothoeye
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1570524-entityreference-getinstance_signature-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

thimothoeye’s picture

Status:Active» Needs review
StatusFileSize
new952 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1570524-entityreference-getinstance_signature-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Status:Needs review» Needs work

The last submitted patch, 1570524-entityreference-getinstance_signature-1.patch, failed testing.

thimothoeye’s picture

StatusFileSize
new736 bytes
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

Sorry, faulty patch. Working with git submodules can be a real PITA :)

thimothoeye’s picture

Status:Needs work» Needs review
tim.plunkett’s picture

Status:Needs review» Reviewed & tested by the community

Looks good to me.

amitaibu’s picture

Status:Reviewed & tested by the community» Fixed

Thanks, committed.

Status:Fixed» Closed (fixed)

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