Bug Report
Environment
- PHP Version: 8.2+
- WordPress Version: [your version]
- Plugin Version: [current version]
Issue
Getting a deprecation warning in PHP 8.2:
Deprecated: Creation of dynamic property Fresh\ACFMarkdownField\MarkdownField::$settings is
deprecated in
/var/www/html/wp-content/plugins/wp-acf-markdown-field-main/src/MarkdownField.php on line
45
Root Cause
The $settings property is being assigned on line 45 without being declared in the class
definition.
Fix
Add property declaration to the MarkdownField class:
class MarkdownField extends acf_field
{
/** @var \Fresh\ACFMarkdownField\Helpers $helpers */
protected $helpers;
/** @var array $settings Plugin settings */
protected $settings; // Add this line
// ... rest of class
}
This resolves the PHP 8.2 deprecation warning while maintaining backward compatibility.
Bug Report
Environment
Issue
Getting a deprecation warning in PHP 8.2:
Deprecated: Creation of dynamic property Fresh\ACFMarkdownField\MarkdownField::$settings is
deprecated in
/var/www/html/wp-content/plugins/wp-acf-markdown-field-main/src/MarkdownField.php on line
45
Root Cause
The
$settingsproperty is being assigned on line 45 without being declared in the classdefinition.
Fix
Add property declaration to the
MarkdownFieldclass: