PHP 8.2 warning message | WordPress.org

[ad_1]

Hello,

I guess this warning message only happens with PHP 8.2.

Deprecated: Creation of dynamic property BNFW::$translations is deprecated in /wp-content/plugins/bnfw/bnfw.php on line 89

As far as I can tell, the “translations” property isn’t accessed anywhere else except for that one function, so I guess it can just be a local variable instead.

public function load_textdomain() {
// Load localization domain.
$translations = dirname( plugin_basename( FILE ) ) . '/languages/';
load_plugin_textdomain( 'bnfw', false, $translations );
}

I didn’t test that.

thanks

  • This topic was modified 2 hours, 4 minutes ago by Aaron.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer