Skip to content

Commit

Permalink
Fix type error; Sanitizer::validateEmail() should return bool
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Sep 21, 2024
1 parent cb1b7e0 commit b6e7ef3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/HookHandlers/SpamEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function onIsValidEmailAddr( $addr, &$result ) {
$match = preg_match( $regex, $addr );
AtEase::restoreWarnings();
if ( $match ) {
$result = false;
return false;
}
}
Expand All @@ -74,6 +75,7 @@ static function ( $block ) {
$this->databaseBlockStore->newListFromConds( [] )
) ) );
if ( in_array( $addr, $emails ) ) {
$result = false;
return false;
}
}
Expand Down

0 comments on commit b6e7ef3

Please sign in to comment.