• juanlopez4691

    (@juanlopez4691)


    This plugin is rising a deprecation warning with PHP 8.2:

    Deprecated: Creation of dynamic property Wplmi\Pages\Dashboard::$subpages is deprecated in /var/www/html/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php on line 77

    Plugin version: 1.8.8

    My fix:

    diff --git a/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php b/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php
    index b9d8fca2..a9a9d9b3 100644
    --- a/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php
    +++ b/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php
    @@ -53,6 +53,13 @@ class Dashboard
     	 */
     	public $pages = [];
     
    +	/**
    +	 * Settings sub-pages.
    +	 *
    +	 * @var array
    +	 */
    +	public $subpages = [];
    +
     	/**
     	 * Register functions.
     	 */
    @@ -228,4 +235,4 @@ class Dashboard
     		
     		return $this->do_filter( 'validate_input', $output, $input );
         }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Also seeing this since updating to PHP 8.2, 8.0 is going end of life so you will see more people updating.

    [07-Dec-2023 15:44:22 UTC] PHP Deprecated: Creation of dynamic property Wplmi\Pages\Dashboard::$subpages is deprecated in /var/www/vhosts/wickedninjagames.com/staging.wickedninjagames.com/wp-content/plugins/wp-last-modified-info/inc/Pages/Dashboard.php on line 77

    hanfox

    (@hanfox)

    It’s not like it’s even a hard error to fix. The property/variable just needs to be pre-defined in the file.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP 8.2 Deprecation Warning’ is closed to new replies.