mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-23 15:56:50 +00:00
Fix inappropriate use of empty(), it should only be used when you want to suppress warnings.
This commit is contained in:
parent
b93ae54c17
commit
f8d04371ec
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue