From b6e7ef3fb06e8c6ec50c8ecaf017c1b23ba5be23 Mon Sep 17 00:00:00 2001 From: lens0021 Date: Sat, 21 Sep 2024 22:12:43 +0900 Subject: [PATCH] Fix type error; Sanitizer::validateEmail() should return bool --- includes/HookHandlers/SpamEmail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/HookHandlers/SpamEmail.php b/includes/HookHandlers/SpamEmail.php index 30fe63e..80a1721 100644 --- a/includes/HookHandlers/SpamEmail.php +++ b/includes/HookHandlers/SpamEmail.php @@ -58,6 +58,7 @@ public function onIsValidEmailAddr( $addr, &$result ) { $match = preg_match( $regex, $addr ); AtEase::restoreWarnings(); if ( $match ) { + $result = false; return false; } } @@ -74,6 +75,7 @@ static function ( $block ) { $this->databaseBlockStore->newListFromConds( [] ) ) ) ); if ( in_array( $addr, $emails ) ) { + $result = false; return false; } }