I am getting this error while using hook_heartbeat_message_alter()
Recoverable fatal error: Argument 2 passed to hook_heartbeat_messages_alter() must be an instance of HeartbeatStream, null given, called in basesite/sites/all/modules/contrib/heartbeat/includes/heartbeatstream.inc

Comments

chhavik’s picture

Stalski,

I am getting the same error. I tried to alter the messages for default "Node Activity" stream using hook_heartbeat_messages_alter

I am using dev version. Below is the error:-

Notice: Undefined property: FavoritesActivity::$_heartbeatState in HeartbeatStream->checkAccess() (line 731 of /var/www/dr7/sites/all/modules/heartbeat/includes/heartbeatstream.inc).

Recoverable fatal error: Argument 2 passed to custom_heartbeat_messages_alter() must be an instance of HeartbeatStream, null given, called in /var/www/dr7/sites/all/modules/heartbeat/includes/heartbeatstream.inc on line 731 and defined in custom_heartbeat_messages_alter() (line 157 of /var/www/dr7/sites/all/modules/custom/custom.module).

Stalski’s picture

Status: Active » Fixed

Just pushed the fix to git a moment ago.

prashantgoel’s picture

thanks stalski

Status: Fixed » Closed (fixed)

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