diff --git a/includes/AbuseFilterRunner.php b/includes/AbuseFilterRunner.php index 6106d5790..a5e017d82 100644 --- a/includes/AbuseFilterRunner.php +++ b/includes/AbuseFilterRunner.php @@ -728,7 +728,7 @@ class AbuseFilterRunner { } $currentExpiry = SpecialBlock::parseExpiryInput( $expiry ); - if ( $currentExpiry > SpecialBlock::parseExpiryInput( $maxExpiry ) ) { + if ( $maxExpiry === -1 || $currentExpiry > SpecialBlock::parseExpiryInput( $maxExpiry ) ) { // Save the parameters to issue the block with $maxExpiry = $expiry; $blockValues = [