Skip to content

Commit

Permalink
Merge pull request #50 from alleyinteractive/logger-filter-trim
Browse files Browse the repository at this point in the history
Ensure the filter is trim-ed
  • Loading branch information
srtfisher authored Apr 8, 2022
2 parents 8fcc8de + 2ea72c6 commit 83f821d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/handler/class-filter-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ protected function is_record_filtered( array $record ): bool {
$message_filters = explode( "\n", $message_filters );

foreach ( (array) $message_filters as $filter ) {
$filter = trim( $filter );

if ( preg_match( "/{$filter}/", $record['message'] ) ) {
return true;
}
Expand Down

0 comments on commit 83f821d

Please sign in to comment.