PHP Deprecation Warnings and Errors
-
I’m experiencing several PHP deprecation warnings and one undefined variable error when using the Optima Express plugin with PHP 8.3. These issues are generating error log entries that are clogging up the logs.
1. Dynamic Property Creation Deprecations
Files affected:
optima-express/iHomefinderRewriteRules.php(Line 30)optima-express/iHomefinderStateManager.php(Line 32)optima-express/iHomefinderShortcodeSelector.php(Line 37)
Error:
E_DEPRECATED - Creation of dynamic property [classname]::$[property] is deprecated
Issue: PHP 8.2+ deprecated the creation of dynamic properties
2. Function Parameter Type Deprecations
File:
optima-express/iHomefinderStateManager.php(Line 279)
Error:E_DEPRECATED - Json_decode(): passing null to parameter #1 ($json) of type string is deprecatedFile:
optima-express/iHomefinderVariableUtility.php(Line 36)
Error:E_DEPRECATED - Str_replace(): passing null to parameter #2 ($replace) of type array|string is deprecatedIssue: PHP 8.1+ requires proper type handling for built-in functions. Null values need to be checked before passing to these functions.
3. Undefined Variable Warning
File:
optima-express/widget/iHomefinderPropertiesGallery.php(Line 474)
Error:E_WARNING - Undefined variable $allowed_html
Issue: The variable$allowed_htmlis being used without being definedEnvironment
- PHP Version: 8.3.24
- WordPress Version: 6.8.2
- Plugin Version: 8.0.5
The topic ‘PHP Deprecation Warnings and Errors’ is closed to new replies.