• Resolved Aidan

    (@aidanashby)


    I keep getting an error message at the top of my sites (the public facing site, though it only shows to logged in users) saying:
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /xxx/wp-content/plugins/google-analytics-for-wordpress/frontend/abstract-class-tracking.php on line 308

Viewing 3 replies - 1 through 3 (of 3 total)
  • Probably you need to add (array) in your in_array() as in_array($var, (array) $array)

    Thread Starter Aidan

    (@aidanashby)

    There’s already an array in there. Line 308 is:
    if ( ! empty( $user->roles ) && in_array( $user->roles[0], $this->options['ignore_users'] ) ) {

    Plugin Author chriscct7

    (@chriscct7)

    This issue has been corrected in the forthcoming MonsterInsights 6.0 release.

    -Chris

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Wrong datatype error’ is closed to new replies.