Php errors when used with php 8.2
-
Hi, I like your plugin. It would be nice to get rid of deprecated errors when using your plugin with php version 8.2.
Opening Custome list (?page=easy_app_customer) there are 4 deprecated errors:
Creation of dynamic property EAAdminPanel::$customers is deprecated in wp-content/plugins/easy-appointments/src/admin.php:978
Creation of dynamic property EAAdminPanel::$search is deprecated in wp-content/plugins/easy-appointments/src/admin.php:979
Creation of dynamic property EAAdminPanel::$paged is deprecated in wp-content/plugins/easy-appointments/src/admin.php:980
Creation of dynamic property EAAdminPanel::$total_pages is deprecated in wp-content/plugins/easy-appointments/src/admin.php:981I have succesfully solve this error by adding these
public $customers;
public $search;
public $paged;
public $total_pages;to class EAAdminPanel {…} in this file src/admin.php
Another php error “strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated” is solved by doing this
// replace this
define(‘EA_PLUGIN_URL’, plugins_url(null, __FILE__) . ‘/’);
// to this
define(‘EA_PLUGIN_URL’, trailingslashit(plugins_url(”, __FILE__)));in file easy-appointments/main.php line 33
It would be great if you could fix these changes in the next version so that I don’t have to modify it again every time I update a plugin.Thank You
You must be logged in to reply to this topic.