r51463 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51462‎ | r51463 | r51464 >
Date:10:15, 4 June 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fix inappropriate use of empty(), it should only be used when you want to suppress warnings.
Modified paths:
  • /trunk/extensions/ConfirmEdit/ConfirmEdit_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
@@ -218,7 +218,7 @@
219219 */
220220 function isIPWhitelisted() {
221221 global $wgCaptchaWhitelistIP;
222 - if( !empty( $wgCaptchaWhitelistIP ) ) {
 222+ if( $wgCaptchaWhitelistIP ) {
223223 $ip = wfGetIp();
224224 foreach ( $wgCaptchaWhitelistIP as $range ) {
225225 if ( IP::isInRange( $ip, $range ) ) {
@@ -349,7 +349,7 @@
350350 }
351351
352352 global $wgCaptchaRegexes;
353 - if( !empty( $wgCaptchaRegexes ) ) {
 353+ if( $wgCaptchaRegexes ) {
354354 // Custom regex checks
355355 $oldtext = $this->loadText( $editPage, $section );
356356

Status & tagging log