Deprecated function: Creation of dynamic property Drupal\simplenews_stats\SimplenewsStatsPage

Created on 19 April 2024, 7 months ago
Updated 3 May 2024, 7 months ago

Problem/Motivation

After installing the module, when visiting the page /node/{node}/simplenews-stats, there are two warnings :

Deprecated function: Creation of dynamic property Drupal\simplenews_stats\SimplenewsStatsPage::$count_view is deprecated in Drupal\simplenews_stats\SimplenewsStatsPage->queryCount() (line 324 of modules/contrib/simplenews_stats/src/SimplenewsStatsPage.php).

Deprecated function: Creation of dynamic property Drupal\simplenews_stats\SimplenewsStatsPage::$count_click is deprecated in Drupal\simplenews_stats\SimplenewsStatsPage->queryCount() (line 324 of modules/contrib/simplenews_stats/src/SimplenewsStatsPage.php).

Steps to reproduce

Drupal version : 10.2.4
Module version : 4.0.0-beta1
PHP version : 8.2.15

- Install module
- Go to page /node/{node}/simplenews-stats

Proposed resolution

Alter the queryCount() method in SimplenewsStatsPage.php class to match declared variables names.

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇫🇷France lifelifeone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024