jenkins-bot has submitted this change and it was merged.

Change subject: Ensure variables are defined
......................................................................


Ensure variables are defined

Change-Id: Iab1d36b0162c1d7a91cdd80ac36bbf338e7df61d
---
M AbuseFilter.class.php
M AbuseFilterVariableHolder.php
M Views/AbuseFilterViewDiff.php
M api/ApiAbuseFilterCheckMatch.php
4 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index 56abda8..9ba4e29 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -499,6 +499,7 @@
        public static function checkFilter( $row, $vars, $profile = false, 
$prefix = '' ) {
                $filterID = $prefix . $row->af_id;
 
+               $startConds = $startTime = null;
                if ( $profile ) {
                        $startConds = self::$condCount;
                        $startTime = microtime( true );
diff --git a/AbuseFilterVariableHolder.php b/AbuseFilterVariableHolder.php
index c33da01..10699de 100644
--- a/AbuseFilterVariableHolder.php
+++ b/AbuseFilterVariableHolder.php
@@ -118,6 +118,7 @@
        public function dumpAllVars( $compute = array(), $includeUserVars = 
false ) {
                $allVarNames = array_keys( $this->mVars );
                $exported = array();
+               $coreVariables = array();
 
                if ( !$includeUserVars ) {
                        // Compile a list of all variables set by the extension 
to be able to filter user set ones by name
diff --git a/Views/AbuseFilterViewDiff.php b/Views/AbuseFilterViewDiff.php
index 3353f29..58ec329 100644
--- a/Views/AbuseFilterViewDiff.php
+++ b/Views/AbuseFilterViewDiff.php
@@ -147,6 +147,7 @@
                        return $cache[$spec];
 
                $dbr = wfGetDB( DB_SLAVE );
+               $row = null;
                if ( is_numeric( $spec ) ) {
                        $row = $dbr->selectRow(
                                'abuse_filter_history',
@@ -182,7 +183,6 @@
                                $this->getOutput()->redirect( $t->getFullURL() 
);
                                return null;
                        }
-
                } elseif ( $spec == 'next' && !in_array( $otherSpec, 
$dependentSpecs ) ) {
                        // cached
                        $other = $this->loadSpec( $otherSpec, $spec );
diff --git a/api/ApiAbuseFilterCheckMatch.php b/api/ApiAbuseFilterCheckMatch.php
index 7f62792..344f66f 100644
--- a/api/ApiAbuseFilterCheckMatch.php
+++ b/api/ApiAbuseFilterCheckMatch.php
@@ -10,6 +10,7 @@
                        $this->dieUsage( 'You don\'t have permission to test 
abuse filters', 'permissiondenied' );
                }
 
+               $vars = null;
                if ( $params['vars'] ) {
                        $vars = FormatJson::decode( $params['vars'], true );
                } elseif ( $params['rcid'] ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/89819
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab1d36b0162c1d7a91cdd80ac36bbf338e7df61d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to