Kilka Posted July 31, 2011 Share Posted July 31, 2011 Bonjour, j'ai des erreurs dans une liste: <li style="border:none;" class="ajax_block_productfirst_item <br /> <b>Warning</b>: Division by zero in <b>/htdocs/zka/tools/smarty/compile/afc57af6f195ee591f9b20775a8f13504895f63d.file.homefeatured.tpl.php</b> on line <b>68</b><br /> last_item_of_line <br /> <b>Warning</b>: Division by zero in <b>/htdocs/zka/tools/smarty/compile/afc57af6f195ee591f9b20775a8f13504895f63d.file.homefeatured.tpl.php</b> on line <b>68</b><br /> "> mais je ne vois pas d'où vient le problème dans le code: <li style="border:none;" class="ajax_block_product{if $smarty.foreach.homeFeaturedProducts.first}first_item{elseif $smarty.foreach.homeFeaturedProducts.last}last_item{else}item{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1}first_item_of_line{/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - ($smarty.foreach.homeFeaturedProducts.total%$nbItemsPerLine))}last_line{/if}"> A votre avis, ça vient d'où ce Warning: Division by zero ? Link to comment Share on other sites More sharing options...
Johann Posted August 1, 2011 Share Posted August 1, 2011 c'est le modulo (%), ta variable $nbItemsPerLine est nulle ou non initialisée Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now