PHP Warning: Attempt to read property "post_type"

  • 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:


    Would you mind to make me aware of the type of message and help to fix the above?

    Thank you in advance, kind regards.