Ticket #1499 (new defect)

Opened 14 months ago

Last modified 2 months ago

Call to Member() on non-object on MemberTableField.php

Reported by: sharvey Owned by: aoneil
Priority: medium Milestone:
Component: Modules - newsletter Version:
Severity: medium effort / impact Keywords:
Cc: Hours:

Description

Animfx had a problem with the newsletter system, there was a non-object error when you clicked a few times on some draft newsletters, then refreshed the page admin/newsletter.

It was a strange bug, and only occured on the live site.

The fix was to add some extra checks on line 359 of MemberTableField?.php

if($this->group && $this->group->Members()) {

}

This IF block wraps around the whole sourceItems = $this->group->Members() so that it can't reach a non-object (and causing the whole system to fail).

Please ensure this fix is added to the latest branch of SS. If you find there's a better solution, please do that, but this one seems to work fine because there's situations when $this->group doesn't exist on sourceItems()

Change History

Changed 13 months ago by sminnee

  • priority changed from critical to minor
  • milestone set to 2.2.1

Changed 10 months ago by sminnee

  • priority changed from minor to medium
  • milestone changed from 2.2.2 feature-lock to 2.2.3 feature-lock

Changed 2 months ago by ischommer

  • milestone 2.2.3* deleted
Note: See TracTickets for help on using tickets.