Attempt to read property “ID” on null in Shortcode

[ad_1]

Plugin is filling my logs with errors:

Attempt to read property "ID" on null in /wp-content/plugins/optinmonster/OMAPI/Shortcodes/Shortcode.php on line 243" while reading response header from upstream, client: ###.###.###.###, server: www.berkeleyfloristsupply.com, request: "POST /aboutus/directions/ HTTP/1.0", host: "www.berkeleyfloristsupply.com", referrer: "https://www.berkeleyfloristsupply.com/aboutus/directions/"

The code referred to in the error is this:

OMAPI_Rules::check_shortcode( $this->campaign, $this->post->ID )

The problem is with the second parameter ‘$this->post->ID’, when the post doesn’t exist.

This should be fixed by adding an ‘isset’ check for ‘$this->post’ before trying to access the ‘ID’ property.

Thanks

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer