Deprecated function: Creation of dynamic property

Created on 11 December 2024, 8 days ago

When visiting the following URL:
`admin/content/simplenews-stats/1`

The following deprecation messages appear:

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).

This issue seems to be related to the creation of dynamic properties, which is deprecated and incompatible with PHP 8.2 and newer. It is recommended to refactor the code by explicitly declaring the `$count_view` and `$count_click` properties in the `SimplenewsStatsPage` class.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΎUruguay gonzalo2683

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

Comments & Activities

Production build 0.71.5 2024