Attempt to read property “ID” on null in frontend_functions.php

[ad_1]

Full error message: AH01071: Got error ‘PHP message: PHP Warning: Attempt to read property “ID” on null in /bitnami/wordpress/wp-content/plugins/customize-my-account-for-woocommerce/include/frontend/frontend_functions.php on line 181PHP

I fixed this error by inputting this conditional at the beginning of the function:

if ($post === null) {

return $content;

}

no more error messages and everything works fine. Might help out someone else and I wanted to let the plugin developers know. Also it is best to check whether this is a good code solution.

Everything on my website is onto the newest version.

  • This topic was modified 11 hours, 11 minutes ago by seclo.

 

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