summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/stats.php')
-rw-r--r--plugins/jetpack/modules/stats.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/stats.php b/plugins/jetpack/modules/stats.php
index ebfa5326..cb56ef7d 100644
--- a/plugins/jetpack/modules/stats.php
+++ b/plugins/jetpack/modules/stats.php
@@ -151,7 +151,7 @@ function stats_template_redirect() {
// Should we be counting this user's views?
if ( ! empty( $current_user->ID ) ) {
$count_roles = stats_get_option( 'count_roles' );
- if ( ! array_intersect( $current_user->roles, $count_roles ) ) {
+ if ( ! is_array( $count_roles ) || ! array_intersect( $current_user->roles, $count_roles ) ) {
return;
}
}