Closed Kvarkas closed 4 months ago
In PHP 8.2 and later, attempting to create dynamic properties on objects directly like this:
$obj->newProperty = ‘value’;
Here is an Error exception:
Uncaught Error: Creation of dynamic property App\MyClass::$newProperty is not allowed
This change was introduced as a security and performance enhancement in PHP 8.2. However, it can break plugins that rely on dynamic property creation.
To fix just need declare it as a class property first:
class WPEX_Theme_Admin_About { /** * Get things started * * @since 1.0 */ public $info;
fix for https://github.com/wpexplorer/wpex-blogger/issues/9
@Kvarkas - Looks like I hadn't updated this repo with the 2.2.2 version which I do have for download on our website. I just pushed it out!
In PHP 8.2 and later, attempting to create dynamic properties on objects directly like this:
$obj->newProperty = ‘value’;
Here is an Error exception:
Uncaught Error: Creation of dynamic property App\MyClass::$newProperty is not allowed
This change was introduced as a security and performance enhancement in PHP 8.2. However, it can break plugins that rely on dynamic property creation.
To fix just need declare it as a class property first:
fix for https://github.com/wpexplorer/wpex-blogger/issues/9