Title: PHP ERROR &#8211; line
Last modified: February 11, 2024

---

# PHP ERROR – line

 *  Resolved [oly002](https://wordpress.org/support/users/oly002/)
 * (@oly002)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-error-line/)
 * Getting this concerning error with the plugin – (even after running regenerate
   thumbnails to ensure everything exists):
 * PHP Warning: Trying to access array offset on value of type null in /var/web/
   site/public_html/wp-content/plugins/advanced-category-and-custom-taxonomy-image/
   wp-advanced-taxonomy-image.php on line 595

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

 *  Thread Starter [oly002](https://wordpress.org/support/users/oly002/)
 * (@oly002)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-error-line/#post-17416117)
 * Using shortcode:
 * [ad_tax_image term_id=”” return_img_tag=”true” class=”featured-img”]
 * Image id is pulling from that current page loaded in template.
    -  This reply was modified 2 years, 4 months ago by [oly002](https://wordpress.org/support/users/oly002/).
 *  [nathaningram](https://wordpress.org/support/users/nathaningram/)
 * (@nathaningram)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-error-line/#post-17431845)
 * I’m having this same error. Line 595.
   I believe the fix is to update line 595
   to this:
 *     ```wp-block-code
       return get_taxonomy_image( $atts['term_id'], filter_var( $atts['return_img_tag'], FILTER_VALIDATE_BOOLEAN ), explode( ' ', $atts['class'] ) );
       ```
   
 * This changes the first $attr[‘term_id’] to $atts[‘term_id’]. Everything works
   for me and no more errors.

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

The topic ‘PHP ERROR – line’ is closed to new replies.

 * ![](https://ps.w.org/advanced-category-and-custom-taxonomy-image/assets/icon-
   128x128.png?rev=2048847)
 * [Advanced Category and Custom Taxonomy Image](https://wordpress.org/plugins/advanced-category-and-custom-taxonomy-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-category-and-custom-taxonomy-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-category-and-custom-taxonomy-image/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-category-and-custom-taxonomy-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-category-and-custom-taxonomy-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-category-and-custom-taxonomy-image/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 2 replies
 * 2 participants
 * Last reply from: [nathaningram](https://wordpress.org/support/users/nathaningram/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/php-error-line/#post-17431845)
 * Status: resolved