Notice: Undefined property: SimplenewsSubscriber::$newsletter_ids in party_simplenews_subscriptions_edit_form() (line 80 of /home/partyopoly/domains/partyopolydev.commonnonsense.co.uk/public_html/sites/all/modules/modified/party_simplenews/party_simplenews.pages.inc).

Warning: array_merge(): Argument #2 is not an array in array_merge() (line 80 of /home/partyopoly/domains/partyopolydev.commonnonsense.co.uk/public_html/sites/all/modules/modified/party_simplenews/party_simplenews.pages.inc).

Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value() (line 2288 of /home/partyopoly/domains/partyopolydev.commonnonsense.co.uk/public_html/includes/form.inc).

Comments

andrewbelcher’s picture

Title: Notices and warnings thrown by party_simplenews » SimplenewsSubscriber::$newsletter_ids not defined
Project: OpenCRM Kickstart » Simplenews
Version: » 7.x-2.x-dev
StatusFileSize
new524 bytes

The problem is SimplenewsSubscriber doesn't define the $newsletter_ids property, it just get's filled out in SimplenewsSubscriberController::attachLoad(). This means that when an entity is created rather than loaded, the property never gets set.

I suppose module developers could always do an isset(), but that seems a bit odd for a property that is vital to the functioning of a subscriber. The attached patch fixes it.

andrewbelcher’s picture

Status: Active » Needs review

Let's get it tested...

berdir’s picture

Status: Needs review » Fixed

Thanks, commited!

Status: Fixed » Closed (fixed)

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