Osclass Support Forums

Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: ishan on October 04, 2021, 10:31:47 AM

Title: Warning: count(): Parameter must be an array or an object that implements
Post by: ishan on October 04, 2021, 10:31:47 AM
I m facing this issue on Item-post page

Warning: count(): Parameter must be an array or an object that implements Countable in /home2/******/public_html/oc-content/themes/veronika/item-post.php on line 143

143 line is
<div class="row" <?php if(count($country) == 1) { ?>style="display:none;"<?php } ?>>

so please help me to solve this problem
Title: Re: Warning: count(): Parameter must be an array or an object that implements
Post by: MB Themes on October 04, 2021, 06:43:30 PM
@ishan
I have not found such code in item-post.php
Try this code as fix:
Code: [Select]
<div class="row" <?php if(count(is_array($country) ? $country : array()) == 1) { ?>style="display:none;"<?php ?>>
Title: Re: Warning: count(): Parameter must be an array or an object that implements
Post by: ishan on October 04, 2021, 07:42:49 PM
thank you so much..

Problem is solved.. You are great..