New Landing How can we help? Atelier Division By Zero

Viewing 3 posts - 1 through 3 (of 3 total)
  • Posted in: Atelier
  • #279813
    chanson
    Member
    Post count: 11

    I have been getting the following errors over and over again in my logs.

    [07-Jul-2016 16:09:44 UTC] PHP Warning: Division by zero in /dom15834/wp-content/themes/atelier/woocommerce/content-product.php on line 41
    [07-Jul-2016 16:09:44 UTC] PHP Warning: Division by zero in /dom15834/wp-content/themes/atelier/woocommerce/content-product.php on line 43
    [07-Jul-2016 16:09:44 UTC] PHP Warning: Division by zero in /dom15834/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 250
    [07-Jul-2016 16:09:44 UTC] PHP Warning: Division by zero in /dom15834/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 252

    I noticed another topic regarding this to deactivate the the Woocommerce Product Archive Plugin, but I am not using it. Any help would be appreciated.

    #279814
    chanson
    Member
    Post count: 11

    both pages that are being called out in the error logs are referring to the same lines of code –

    function wc_get_loop_class() {
    	global $woocommerce_loop;
    
    	$woocommerce_loop['loop']    = ! empty( $woocommerce_loop['loop'] ) ? $woocommerce_loop['loop'] + 1   : 1;
    	$woocommerce_loop['columns'] = ! empty( $woocommerce_loop['columns'] ) ? $woocommerce_loop['columns'] : apply_filters( 'loop_shop_columns', 4 );
    
    	if ( 0 === ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 === $woocommerce_loop['columns'] ) {
    		return 'first';
    	} elseif ( 0 === $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) {
    		return 'last';
    	} else {
    		return '';
    	}
    }
    
    #279991
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @chanson

    This indicates something wrong in the setup of your shop, have double checked locally and have no issues in our test sites.

    Do you have any other plugins which are related to WooCommerce? Do you have the latest WooCommerce version installed?

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register