Attempt to read property “ID” on null in Shortcode
-
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]
- You must be logged in to reply to this topic.