Jump to content

Edit History

gjferrando

gjferrando

Tuve el mismo problema en /module/blockwishlist/blockwishlist_button.tpl
El error se presenta en PHP 7.2 y no en PHP 5.6

Código original:

{if isset($wishlists) && count($wishlists) > 1}   
    	{foreach name=wl from=$wishlists item=wishlist}
    		{if $smarty.foreach.wl.first}
    			<a class="addToWishlist wishlist_button_list" tabindex="0" data-toggle="popover" data-trigger="focus" title="{l s='Wishlist' mod='blockwishlist'}" data-placement="bottom">{l s='Add to wishlist' mod='blockwishlist'}</a>
    				<div hidden class="popover-content">
    					<table class="table" border="1">
    						<tbody>
    		{/if}
    							<tr title="{$wishlist.name}" value="{$wishlist.id_wishlist}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1, '{$wishlist.id_wishlist}');">
    								<td>
    									{l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'}
    								</td>
    							</tr>
    		{if $smarty.foreach.wl.last}
    					</tbody>
    				</table>
    			</div>
    		{/if}
    	{foreachelse}
    		<a class="addToWishlist" href="#" id="wishlist_button_nopop" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;" rel="nofollow"  title="{l s='Add to my wishlist' mod='blockwishlist'}">
    			{l s='Add to wishlist' mod='blockwishlist'}
    		</a>
    	{/foreach}
{else}
	<a class="addToWishlist wishlistProd_{$product.id_product|intval}" title="{l s='Add to wishlist' mod='blockwishlist'}" href="#" data-rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;">
		{l s='Add to wishlist' mod='blockwishlist'}
	</a>
{/if}

 

Reemplazado por:

{if isset($wishlists) && is_countable($wishlists)}
    {if count($wishlists) > 1}
    	{foreach name=wl from=$wishlists item=wishlist}
    		{if $smarty.foreach.wl.first}
    			<a class="addToWishlist wishlist_button_list" tabindex="0" data-toggle="popover" data-trigger="focus" title="{l s='Wishlist' mod='blockwishlist'}" data-placement="bottom">{l s='Add to wishlist' mod='blockwishlist'}</a>
    				<div hidden class="popover-content">
    					<table class="table" border="1">
    						<tbody>
    		{/if}
    							<tr title="{$wishlist.name}" value="{$wishlist.id_wishlist}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1, '{$wishlist.id_wishlist}');">
    								<td>
    									{l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'}
    								</td>
    							</tr>
    		{if $smarty.foreach.wl.last}
    					</tbody>
    				</table>
    			</div>
    		{/if}
    	{foreachelse}
    		<a class="addToWishlist" href="#" id="wishlist_button_nopop" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;" rel="nofollow"  title="{l s='Add to my wishlist' mod='blockwishlist'}">
    			{l s='Add to wishlist' mod='blockwishlist'}
    		</a>
    	{/foreach}
    {/if}
{else}
	<a class="addToWishlist wishlistProd_{$product.id_product|intval}" title="{l s='Add to wishlist' mod='blockwishlist'}" href="#" data-rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;">
		{l s='Add to wishlist' mod='blockwishlist'}
	</a>
{/if}

 

gjferrando

gjferrando

Tuve el mismo problema en /module/blockwishlist/blockwishlist_button.tpl
El error se presenta en PHP 7.2 y no en PHP 5.6

Código original:

{if isset($wishlists) && count($wishlists) > 1}   
    	{foreach name=wl from=$wishlists item=wishlist}
    		{if $smarty.foreach.wl.first}
    			<a class="addToWishlist wishlist_button_list" tabindex="0" data-toggle="popover" data-trigger="focus" title="{l s='Wishlist' mod='blockwishlist'}" data-placement="bottom">{l s='Add to wishlist' mod='blockwishlist'}</a>
    				<div hidden class="popover-content">
    					<table class="table" border="1">
    						<tbody>
    		{/if}
    							<tr title="{$wishlist.name}" value="{$wishlist.id_wishlist}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1, '{$wishlist.id_wishlist}');">
    								<td>
    									{l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'}
    								</td>
    							</tr>
    		{if $smarty.foreach.wl.last}
    					</tbody>
    				</table>
    			</div>
    		{/if}
    	{foreachelse}
    		<a class="addToWishlist" href="#" id="wishlist_button_nopop" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;" rel="nofollow"  title="{l s='Add to my wishlist' mod='blockwishlist'}">
    			{l s='Add to wishlist' mod='blockwishlist'}
    		</a>
    	{/foreach}
{else}
	<a class="addToWishlist wishlistProd_{$product.id_product|intval}" title="{l s='Add to wishlist' mod='blockwishlist'}" href="#" data-rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;">
		{l s='Add to wishlist' mod='blockwishlist'}
	</a>
{/if}

 

Reemplazado por:

{if isset($wishlists) && is_countable($wishlists)}
    {count($wishlists) > 1}
    	{foreach name=wl from=$wishlists item=wishlist}
    		{if $smarty.foreach.wl.first}
    			<a class="addToWishlist wishlist_button_list" tabindex="0" data-toggle="popover" data-trigger="focus" title="{l s='Wishlist' mod='blockwishlist'}" data-placement="bottom">{l s='Add to wishlist' mod='blockwishlist'}</a>
    				<div hidden class="popover-content">
    					<table class="table" border="1">
    						<tbody>
    		{/if}
    							<tr title="{$wishlist.name}" value="{$wishlist.id_wishlist}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1, '{$wishlist.id_wishlist}');">
    								<td>
    									{l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'}
    								</td>
    							</tr>
    		{if $smarty.foreach.wl.last}
    					</tbody>
    				</table>
    			</div>
    		{/if}
    	{foreachelse}
    		<a class="addToWishlist" href="#" id="wishlist_button_nopop" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;" rel="nofollow"  title="{l s='Add to my wishlist' mod='blockwishlist'}">
    			{l s='Add to wishlist' mod='blockwishlist'}
    		</a>
    	{/foreach}
    {/if}
{else}
	<a class="addToWishlist wishlistProd_{$product.id_product|intval}" title="{l s='Add to wishlist' mod='blockwishlist'}" href="#" data-rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;">
		{l s='Add to wishlist' mod='blockwishlist'}
	</a>
{/if}

 

×
×
  • Create New...