From: Tim Starling Date: Thu, 4 Jun 2009 10:15:52 +0000 (+0000) Subject: Fix inappropriate use of empty(), it should only be used when you want to suppress... X-Git-Url: https://git.toastfreeware.priv.at/toast/cookiecaptcha.git/commitdiff_plain/f8d04371ec201dc6c64d2daeeb9bf123836f2d7b?ds=sidebyside Fix inappropriate use of empty(), it should only be used when you want to suppress warnings. --- 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 );