Title: PHP Notice for non-object
Last modified: September 27, 2017

---

# PHP Notice for non-object

 *  [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * (@leanderbraunschweig)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/php-notice-for-non-object/)
 * I am seeing PHP Notices with regards to accessing properties of a non-object,
   this is happening in the `smart_google_pcc_code`-function and can be fixed by
   wrapping the function contents in a conditional statement checking for the existence
   of the post like `if ($post) {...}`.
 * Please consider fixing this in the next plugin version.
 * Thanks!

The topic ‘PHP Notice for non-object’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smart-google-code-inserter_919d9b.
   svg)
 * [Smart Google Code Inserter](https://wordpress.org/plugins/smart-google-code-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-google-code-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-google-code-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-google-code-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-google-code-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-google-code-inserter/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [leanderbraunschweig](https://wordpress.org/support/users/leanderbraunschweig/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/php-notice-for-non-object/)
 * Status: not resolved