From f8d04371ec201dc6c64d2daeeb9bf123836f2d7b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 4 Jun 2009 10:15:52 +0000 Subject: [PATCH 1/1] Fix inappropriate use of empty(), it should only be used when you want to suppress warnings. --- ConfirmEdit_body.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ConfirmEdit_body.php b/ConfirmEdit_body.php index 57655c6..2d21246 100644 --- a/ConfirmEdit_body.php +++ b/ConfirmEdit_body.php @@ -218,7 +218,7 @@ class SimpleCaptcha { */ function isIPWhitelisted() { global $wgCaptchaWhitelistIP; - if( !empty( $wgCaptchaWhitelistIP ) ) { + if( $wgCaptchaWhitelistIP ) { $ip = wfGetIp(); foreach ( $wgCaptchaWhitelistIP as $range ) { if ( IP::isInRange( $ip, $range ) ) { @@ -349,7 +349,7 @@ class SimpleCaptcha { } global $wgCaptchaRegexes; - if( !empty( $wgCaptchaRegexes ) ) { + if( $wgCaptchaRegexes ) { // Custom regex checks $oldtext = $this->loadText( $editPage, $section ); -- 2.39.5