PHP Warning: Attempt to read property "ID" on null in FrontEnd.php on line 210

Can we get the code cleaned up on the next release to address this?
PHP Warning: Attempt to read property “ID” on null in wp-content\themes\pro\cornerstone\includes\classes\Services\FrontEnd.php on line 210

Per Gemini-
Add a Null Guard: Wrap the property access or ensure the object exists before reading its properties. For example, if the code looks like $post->ID , change it to check for existence first:

PHP

// Ensure $post or the queried object is valid before reading ID
$post_id = ( isset( $post ) && is_object( $post ) ) ? $post->ID : 0;

1 Like

We’ll get a null guard in place. Thanks for sending this our way and have a great day.