Howdy
I own a VPS running under PHP 8.1.17 script execution mode FPM and I use WP as CMS.
Please note the following alert from the PHP error log:
Code
PHP Warning: Attempt to read property "post_type" on null in /home/mywebsite/public_html/wp-content/plugins/affiliate-toolkit-starter/affiliate-toolkit.php on line 77
PHP Warning: Attempt to read property "post_type" on null in /home/mywebsite/public_html/wp-content/plugins/affiliate-toolkit-starter/affiliate-toolkit.php on line 79
PHP Warning: Attempt to read property "post_type" on null in /home/mywebsite/public_html/wp-content/plugins/affiliate-toolkit-starter/affiliate-toolkit.php on line 81
Here it is the extraction from affiliate-toolkit.php:
Code
(74) function my_affiliate_toolkit_to_trash() {
(75) global $post;
(76)
(77) if ($post->post_type == 'atkp_product') {
(78) do_action('atkp_product_to_trash', $post->ID);
(79) } else if ($post->post_type == 'atkp_shop') {
(80) do_action('atkp_shop_to_trash', $post->ID);
(81) } else if ($post->post_type == 'atkp_list') {
(82) do_action('atkp_list_to_trash', $post->ID);
(83) }
(84) }
Display More
Would you mind to make me aware of the type of message and help to fix the above?
Thank you in advance, kind regards.