backdrop-contrib / simplenews

BackdropCMS port of the Simplenews module for Drupal 7
GNU General Public License v2.0
1 stars 3 forks source link

PHP 8 compatibility - Creation of dynamic property #24

Closed indigoxela closed 7 months ago

indigoxela commented 8 months ago

When sending a test-newsletter, I got:

    Deprecated function: Creation of dynamic property SimplenewsSourceNode::$uid is deprecated in SimplenewsSourceNode->setContext() (line 612 of .../modules/simplenews/includes/simplenews.source.inc).
    Deprecated function: Creation of dynamic property SimplenewsSourceNode::$original_language is deprecated in SimplenewsSourceNode->setContext() (line 620 of .../modules/simplenews/includes/simplenews.source.inc).

To fix it, there should be definitions for both properties in class SimplenewsSourceNode:

  protected $uid;// or maybe "public"?
  protected $original_language;

Note, I'm not actually familiar with simplenews, just saw this when testing something. (AKA don't wait for my PR, just go ahead and fix it). :wink:

alanmels commented 7 months ago

Thanks for reporting. Even-though I could not replicate the issue sending multiple test newsletters, I trust your judgement and will be adding both definitions.