Fix inappropriate use of empty(), it should only be used when you want to suppress warnings.

This commit is contained in:
Tim Starling 2009-06-04 10:15:52 +00:00
parent b93ae54c17
commit f8d04371ec

View file

@ -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 );