Title: ERROR with Attachment
Last modified: September 1, 2016

---

# ERROR with Attachment

 *  [Jaed Mosharraf](https://wordpress.org/support/users/jaedm97/)
 * (@jaedm97)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/error-with-attachment/)
 * Hello,
    I found this error in the latest version.
 * Error details: If any product don’t have any images/attachments then it is showing
   error if my debug mode in true. This is not a way.
 * Solution: I found the solution. I found that the attachment object is not checked
   before loading in wc_get_product_attachment_props() function in wc-product-functions.
   php file.
 * if you add a object check just after line 720 and before line 721 like
 *  `if( ! is_object( $attachment ) ) return;
 * then it would okay.
 * I hope soon it will updated.
 * Thanks.
    Jaed
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 1 replies (of 1 total)

 *  [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * (@rynald0s)
 * Automattic Happiness Engineer
 * [9 years, 9 months ago](https://wordpress.org/support/topic/error-with-attachment/#post-7634007)
 * Hi Jaed,
 * I just tested this with my local demo site, and I couldn’t get any debug errors
   by not adding any images/attachements to my product. What is the exact error 
   message you are seeing on your end? Can you please provide me a step by step 
   guide to replicate what you’re seeing?
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘ERROR with Attachment’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Rynald0s](https://wordpress.org/support/users/rynald0s/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/error-with-attachment/#post-7634007)
 * Status: not resolved