Title: Warning: count(
Last modified: March 26, 2018

---

# Warning: count(

 *  [harrynz](https://wordpress.org/support/users/harrynz/)
 * (@harrynz)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/warning-count-2/)
 * Hi,
    I am using Shopper theme free version. There is a problem on the home page,
   it is giving warning while customization of the website.
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in C:\Apache24\htdocs\wp-content\themes\shopper\inc\shopper-functions.php on 
   line 206
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in C:\Apache24\htdocs\wp-content\themes\shopper\inc\shopper-functions.php on 
   line 206
 * And the 206 line of the shopper-function.php contains following code:-
    function
   shopper_homepage_control_get_hooks() {
 *  global $wp_filter;
 *  $response = array();
 *  /*line 206 ——
    if ( isset( $wp_filter[‘shopper_homepage’] ) && 0 < count( $wp_filter[‘
   shopper_homepage’] ) ) {
 *  foreach ( $wp_filter[‘shopper_homepage’] as $k => $v ) {
    if ( is_array( $v )){
   foreach ( $v as $i => $j ) { if ( is_array( $j[‘function’] ) ) { $i = get_class(
   $j[‘function’][0] ) . ‘@’ . $j[‘function’][1]; $response[$i] = shopper_homepage_control_format_title(
   $j[‘function’][1]); } else { $response[$i] = shopper_homepage_control_format_title(
   $i); } } } } }*/
 *  return $response;
    } When I comment these lines then it works fine.I am wondering
   what is the purpose of this code and how can I solve this problem.
 * Thanks

The topic ‘Warning: count(’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/shopper/1.3.8/screenshot.png)
 * Shopper
 * [Support Threads](https://wordpress.org/support/theme/shopper/)
 * [Active Topics](https://wordpress.org/support/theme/shopper/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/shopper/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/shopper/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [harrynz](https://wordpress.org/support/users/harrynz/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/warning-count-2/)
 * Status: not resolved