I get the following error from line 762 in notifications.module:

array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer

Changing that line from

if ($refresh || !array_key_exists($sid, $cache)) {

to

if ((is_numeric($sid) && ($refresh || !array_key_exists($sid, $cache)))) {  

seems to fix the problem but I'm not 100% sure non-existent sid's should be possible?

Comments

samhassell’s picture

I should add that the error occurs when submitting a comment that has been subscribed to. That subscription is XMPP-based, but the user doesn't have an account name entered. So I guess notifications should handle a situation where another module passes it a null value.

Jose Reyero’s picture

Status: Needs review » Closed (duplicate)

This is the same as #432556: Error during queue process / post submission: warning: array_key_exists()

No, we are not fixing this in Notifications. It is the og plug-in passing the wrong parameters, and we need to fix it there.