I'm running php 5.3.4, and when I go to the node/%node/purge page, the following php error gets thrown:

Warning: Parameter 2 to feedapi_invoke() expected to be a reference, value given in menu_execute_active_handler() (line 349 of /Library/WebServer/Documents/hci/includes/menu.inc).

resulting in a blank page.

Function definition is:

function feedapi_invoke($op, &$feed, $param = NULL)

so $feed is expected to be a reference, whereas it is not.

Per http://php.net/manual/en/function.call-user-func-array.php:

Passing by value when the function expects a parameter by reference results in a warning and having call_user_func() return FALSE (does not apply if the passed value has a reference count = 1).

Suggestions on the best approach to correct the bug? I know that if the function definition is changed to:

function feedapi_invoke($op, $feed, $param = NULL)

the purge operation succeeds without errors, but I'm not sure about other ramifications. I.e. are there good reasons to pass $feed by reference?

CommentFileSizeAuthor
#3 feedapi-1217962-3-fix-wsod.patch383 bytesmikeytown2

Comments

robbm’s picture

Subscribing (same issue here...)

jacobmn’s picture

I'm on PHP 5.3.3 and seeing the same issue. I've removed the ampersand but also wondering if this is going to cause any other issues?

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new383 bytes
anitha.a’s picture

anitha.a’s picture

Thanks its working...sorry for the trouble!!

mikeytown2’s picture

Status: Needs review » Reviewed & tested by the community
chyatt’s picture

#3 worked for me!