• Resolved antburnett

    (@antburnett)


    Plugin looked promising, but can’t set up when using PHP 7.3 and WordPress 5.3 on IIS due to an issue with count compatibility.

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in C:\inetpub\wwwroot\…\plugins\wp-store-locator\admin\class-metaboxes.php on line 470

    $hour_count = count( $opening_hours[$index] );

    There are 4 instances of the error.

    Haven’t got further than Error 500 when setting up the site.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Can you try to replace

    $hour_count = count( $opening_hours[$index] );

    with this in the code? Does that fix it?

    if ( is_array( $opening_hours[$index] ) ) {
       $hour_count = count( $opening_hours[$index] );
    } else {
       $hour_count = 0;
    }
    Thread Starter antburnett

    (@antburnett)

    Thanks, Tijmen – that has resolved the issue of not being able to get to the Settings page. Thank you for such a fast response time zones and all!

    Aside: there is a warning that may need attention:
    Google Maps JavaScript API warning: RetiredVersion

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Good to hear this fixes it. Will include the fix in the next update, and also fixed the retired version warning.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parameter must be an array or an object that implements Countable’ is closed to new replies.