Title: PHP Errors
Last modified: December 16, 2021

---

# PHP Errors

 *  Resolved [dydadou](https://wordpress.org/support/users/dydadou/)
 * (@dydadou)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-errors-253/)
 * Hi there,
    Query monitor is showing up two php errors that I don’t know how to
   solve. Any help would be welcome !
 *     ```
       Avertissement	Invalid argument supplied for foreach()	2	
       wp-content/plugins/woocommerce/includes/wc-template-functions.php:3713
       wc_get_formatted_cart_item_data()
       wp-content/plugins/woocommerce/templates/cart/mini-cart.php:62
       wc_get_template()
       wp-content/plugins/woocommerce/includes/wc-template-functions.php:2218
       woocommerce_mini_cart()
       wp-content/themes/flatsome/template-parts/header/partials/element-cart.php:80
       load_template('wp-content/themes/flatsome/template-parts/header/partials/element-cart.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/partials/element-cart','')
       wp-content/themes/flatsome/inc/structure/structure-header.php:97
       flatsome_header_elements()
       wp-content/themes/flatsome/template-parts/header/header-main.php:27
       load_template('wp-content/themes/flatsome/template-parts/header/header-main.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/header','main')
       wp-content/themes/flatsome/template-parts/header/header-wrapper.php:7
       load_template('wp-content/themes/flatsome/template-parts/header/header-wrapper.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/header','wrapper')
       wp-content/themes/flatsome-child/header.php:27
       load_template('wp-content/themes/flatsome-child/header.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:48
       get_header()
       wp-content/themes/flatsome/page.php:17
       Extension : woocommerce
       Avertissement	count(): Parameter must be an array or an object that implements Countable	2	
       wp-content/plugins/woocommerce/includes/wc-template-functions.php:3724
       wc_get_formatted_cart_item_data()
       wp-content/plugins/woocommerce/templates/cart/mini-cart.php:62
       wc_get_template()
       wp-content/plugins/woocommerce/includes/wc-template-functions.php:2218
       woocommerce_mini_cart()
       wp-content/themes/flatsome/template-parts/header/partials/element-cart.php:80
       load_template('wp-content/themes/flatsome/template-parts/header/partials/element-cart.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/partials/element-cart','')
       wp-content/themes/flatsome/inc/structure/structure-header.php:97
       flatsome_header_elements()
       wp-content/themes/flatsome/template-parts/header/header-main.php:27
       load_template('wp-content/themes/flatsome/template-parts/header/header-main.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/header','main')
       wp-content/themes/flatsome/template-parts/header/header-wrapper.php:7
       load_template('wp-content/themes/flatsome/template-parts/header/header-wrapper.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:204
       get_template_part('template-parts/header/header','wrapper')
       wp-content/themes/flatsome-child/header.php:27
       load_template('wp-content/themes/flatsome-child/header.php')
       wp-includes/template.php:716
       locate_template()
       wp-includes/general-template.php:48
       get_header()
       wp-content/themes/flatsome/page.php:17
       ```
   
 * Many tahnks 🙂

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

 *  [MayKato](https://wordpress.org/support/users/maykato/)
 * (@maykato)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-errors-253/#post-15170395)
 * Hello,
 * It looks like the error is coming from your theme. The best way to determine 
   the cause of the issue is to temporarily switch your theme back to [Storefront](https://wordpress.org/themes/storefront/)
   and disable all plugins except for WooCommerce. If that resolves the issue, then
   re-enable plugins one-by-one until you find the one that’s causing the conflict.
 * You can find a more detailed explanation on how to do a conflict test here: [https://docs.woocommerce.com/document/how-to-test-for-conflicts/](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 *  [MayKato](https://wordpress.org/support/users/maykato/)
 * (@maykato)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/php-errors-253/#post-15191556)
 * We’ve not heard back from you in a while, so I’m marking this thread as resolved.
   Hopefully, you were able to find a solution to your problem! If you have further
   questions, please feel free to open a new topic.

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

The topic ‘PHP Errors’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [MayKato](https://wordpress.org/support/users/maykato/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/php-errors-253/#post-15191556)
 * Status: resolved