One of my users reported the following error message after creating a new post on notifications enabled content:

Undefined property: Notifications_Node_Post_Event::$notif_error in Notifications_Event->send_list() (line 555 of /sites/all/modules/notifications/notifications.event.inc).

The class declares $notif_errors, so the problem here is simply a typo. Patch will follow.

CommentFileSizeAuthor
#2 notifications-notif-error-2881432.patch433 bytespbirk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pbirk created an issue. See original summary.

pbirk’s picture

Status: Active » Needs review
FileSize
433 bytes

I used "grep -Rn 'notif_error' *" to complete a simple check to make sure the notif_error variable should not be used and received the following output:

notifications.event.inc:63: public $notif_errors = 0; // Number of sending errors
notifications.event.inc:555: $this->notif_error++;
notifications.install:181: 'notif_errors' => array(
notifications.install:224: foreach (array('send_start', 'send_end', 'send_time', 'notif_count', 'notif_errors', 'notif_sent', 'notif_success', 'log') as $field) {

As we can see, notif_error is only called once and the variable was previously declared $notif_errors.

Attached a patch against 7.x-1.0-alpha2+12-dev to resolve the issue.

tormi’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.