• 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.