Title: PHP warning regarding taxonomy
Last modified: October 2, 2023

---

# PHP warning regarding taxonomy

 *  Resolved [Jon Fuller](https://wordpress.org/support/users/garconis/)
 * (@garconis)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-warning-regarding-taxonomy/)
 * Getting this a couple times a day:
 *     ```wp-block-code
       PHP Warning: Attempt to read property "taxonomy" on null in /srv/htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Meta/Robots.php on line 226
       ```
   
 * [https://freshy.media/captures/gSl3pnKbCa.png](https://freshy.media/captures/gSl3pnKbCa.png)
 * We are currently on PHP 8.0

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [PuNK DeSi](https://wordpress.org/support/users/ades_ting/)
 * (@ades_ting)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-warning-regarding-taxonomy/#post-17094296)
 * It means that $term is null so unable to fetch $term->taxonomy 
   go to that file
   line 226 and add a **[is_null()](https://www.php.net/manual/en/function.is-null.php)**
   check.
    -  This reply was modified 2 years, 8 months ago by [PuNK DeSi](https://wordpress.org/support/users/ades_ting/).
    -  This reply was modified 2 years, 8 months ago by [PuNK DeSi](https://wordpress.org/support/users/ades_ting/).
 *  Plugin Author [arnaudbroes](https://wordpress.org/support/users/arnaudbroes/)
 * (@arnaudbroes)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-warning-regarding-taxonomy/#post-17094676)
 * Hey [@garconis](https://wordpress.org/support/users/garconis/),
 * Do you have any idea what particular page this is happening on?
 * In order for the code to get there in the first place, the page must identify
   itself as a term (`is_category()`, `is_tax()` or `is_tag()`) which is why we 
   are expecting the query to return a term for us.
 * We theoretically can add another check there to prevent this warning from being
   output but I think there’s a bigger issue at play here. Either the page should
   not identify itself as a term or the query should return a term object.
 *  Plugin Support [Prabhat](https://wordpress.org/support/users/prabhatrai/)
 * (@prabhatrai)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-warning-regarding-taxonomy/#post-17102622)
 * Hi [@garconis](https://wordpress.org/support/users/garconis/),
 * We haven’t heard back from you in a couple of days. I’m going to go ahead and
   close this thread for now. But if you’d like us to assist, please feel welcome
   to continue the conversation.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP warning regarding taxonomy’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [Prabhat](https://wordpress.org/support/users/prabhatrai/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/php-warning-regarding-taxonomy/#post-17102622)
 * Status: resolved