Support » Plugin: NK Google Analytics » Error – Please fix in next update

  • Resolved fredroo

    (@fredroo)


    Please fix this error
    PHP Warning: count(): Parameter must be an array or an object that implements Countable in
    /plugins/nk-google-analytics/NKgoogleanalytics.php on line 120

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • @marodok please fix this warning

    Same bug here.
    Shows up when running php 7 with wp-debug enabled.

    On php 5.6 the plugin works fine.

    Please fix.

    Yep, the plugin is not fully compatible with PHP 7.

    You guys might want to fix this ASAP.

    +1

    Yes +1 please fix Warning: count(): Parameter must be an array or an object that implements Countable in /customer

    Any updates on this issue? The default code on line 121:

    if (is_array($ignored_roles) && $total_ignored_roles > 0) {

    does not work if modified and rolled back:

    Your PHP code changes were rolled back due to an error on line 121 of file wp-content/plugins/nk-google-analytics/NKgoogleanalytics.php. Please fix and try saving again.
    syntax error, unexpected ‘ ‘ (T_STRING)

    I fixed myself by editing the line 120 to

    $total_ignored_roles = @count(get_option('nkweb_ignore'));

    Still not fixed!!! My error_log start to be very fat… Do this plugin still maintained?

    Thanks @giangel84 — adding the @ symbol to that line of code solved the problem for me. I appreciate you sharing that code change!

    Plugin Author marodok

    (@marodok)

    Hi everyone, I’ll apply the fix and updates in coming days, thank you for the waiting.

    Plugin Author marodok

    (@marodok)

    Hi everyone, please check the update (version 1.5.0). Please let me know of any issue.

    Regards

    Plugin Author marodok

    (@marodok)

    I’ll close this ticket, if need help please open a new one.

    Regards.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.