diff --git a/classes/class-log.php b/classes/class-log.php index 2a9f6c681..7d9f70ed8 100644 --- a/classes/class-log.php +++ b/classes/class-log.php @@ -194,7 +194,9 @@ public function is_record_excluded( $connector, $context, $action, $user = null, 'role' => ( ! empty( $exclude_rule['author_or_role'] ) && ! is_numeric( $exclude_rule['author_or_role'] ) ) ? $exclude_rule['author_or_role'] : null, ); - $exclude_rules = array_filter( $exclude, 'strlen' ); + $exclude_rules = array_filter( $exclude, function ( $val ) { + return !is_null( $val ) && strlen( $val ); + }); if ( $this->record_matches_rules( $record, $exclude_rules ) ) { $exclude_record = true;