Title: Wrong datatype error
Last modified: December 7, 2016

---

# Wrong datatype error

 *  Resolved [Aidan](https://wordpress.org/support/users/aidanashby/)
 * (@aidanashby)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/wrong-datatype-error-2/)
 * 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)

 *  [Everterstraat](https://wordpress.org/support/users/everterstraat/)
 * (@everterstraat)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/wrong-datatype-error-2/#post-8531813)
 * Probably you need to add (array) in your in_array() as in_array($var, (array)
   $array)
 *  Thread Starter [Aidan](https://wordpress.org/support/users/aidanashby/)
 * (@aidanashby)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/wrong-datatype-error-2/#post-8678030)
 * 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](https://wordpress.org/support/users/chriscct7/)
 * (@chriscct7)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/wrong-datatype-error-2/#post-8678209)
 * 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.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [chriscct7](https://wordpress.org/support/users/chriscct7/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/wrong-datatype-error-2/#post-8678209)
 * Status: resolved