diff --git a/classes/class-log.php b/classes/class-log.php index f9e66fe07..81f4c575d 100644 --- a/classes/class-log.php +++ b/classes/class-log.php @@ -194,7 +194,12 @@ 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 ( $value ) { + return ! is_null( $value ) && '' !== $value; + } + ); if ( $this->record_matches_rules( $record, $exclude_rules ) ) { $exclude_record = true;