Jump to content
thirty bees forum
  • 0

Seach fails in Blockwishlist fails under 1.4.0/php 8.0


Ian Ashton

Question

Trying my first upgrade to 1.4.0/PHP 8.0

Does this look like a bug? Is the the right place to report it?

This error appears after a Search for a product.

 

TypeError

count(): Argument #1 ($value) must be of type Countable|array, bool given

when rendering smarty template /home/domains/vol2/033/3247033/user/htdocs/themes/community-theme-default/modules/blockwishlist/blockwishlist_button.tpl

Source file: /home/domains/vol2/033/3247033/user/htdocs/themes/community-theme-default/modules/blockwishlist/blockwishlist_button.tpl

1:{if isset($wishlists) && count($wishlists) > 1}
2:  <div class="wishlist">
3:    <a class="wishlist_button_list" tabindex="0" data-toggle="popover" data-trigger="focus" title="{l s='Wishlist' mod='blockwishlist'}" data-placement="top">
4:      <i class="icon icon-star-o"></i> {l s='Add to wishlist' mod='blockwishlist'}
5:    </a>
6:    <div hidden class="popover-content">
7:      <ul class="list-unstyled">
8:        {foreach name=wl from=$wishlists item=wishlist}
9:          <li>
10:            <a title="{$wishlist.name|escape:'html':'UTF-8'}" value="{$wishlist.id_wishlist}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1, '{$wishlist.id_wishlist}');">
11:              {l s='Add to %s' sprintf=[$wishlist.name] mod='blockwishlist'}
12:            </a>
13:          </li>
14:        {/foreach}
15:      </ul>
16:    </div>
17:  </div>
18:{else}
19:  <div class="wishlist">
20:    <a class="addToWishlist wishlistProd_{$product.id_product|intval}" href="#" rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;">
21:      <i class="icon icon-star-o"></i> {l s="Add to Wishlist" mod='blockwishlist'}
22:    </a>
23:  </div>
24:{/if}

Stack trace

 

PHP version: 8.0.26.  Code revision: 1.4.0 build for PHP 8.0
Link to comment
Share on other sites

1 answer to this question

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...