When sending notifications for new group content, I ran across an issue where I would get the following PHP error:

Error: Unsupported operand types in Notifications_Event->send_all() (line 463 of /srv/bindings/681a10580b0146f1850e945b5adbae8a/code/profiles/schoolyard/modules/contrib/notifications/notifications.event.inc).

I noticed in this scenario the send_all() function in notifications.event.inc the $success variable was being set to an empty array. This caused an issue with this line:
$errors = $sent - $success;

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kevin_martin created an issue. See original summary.

kevin_martin’s picture

jacob.embree’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Status: Active » Needs review

I think $success should always be an integer, so setting the default value to an empty array seems incorrect to me. Please test with this patch that sets 'success' to 0 by default.

jacob.embree’s picture