Fix two instances of calling function with too few args
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 15 Dec 2016 19:33:43 +0000 (11:33 -0800)
committerStanislav Malyshev <smalyshev@gmail.com>
Thu, 15 Dec 2016 21:24:40 +0000 (13:24 -0800)
At one point SearchIndexFieldDefinition was updated to require the
engine to be passed in, but it seems that update was missed here.

BackupDumper::loadPlugin() requires the second argument, set it to
the empty string to keep current behaviour.

Change-Id: Ifbd8fc4870ff63b2d338f8bb4d251d7a3477b989

includes/search/DummySearchIndexFieldDefinition.php
maintenance/backup.inc
tests/phan/config.php

index a2a6760..3ee3ed5 100644 (file)
@@ -21,7 +21,7 @@ class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition {
                ];
 
                foreach ( $this->subfields as $subfield ) {
-                       $mapping['subfields'][] = $subfield->getMapping();
+                       $mapping['subfields'][] = $subfield->getMapping( $engine );
                }
 
                return $mapping;
index 18c7f11..befafc1 100644 (file)
@@ -163,7 +163,7 @@ class BackupDumper extends Maintenance {
                                        $val = explode( ':', $param );
 
                                        if ( count( $val ) === 1 ) {
-                                               $this->loadPlugin( $val[0] );
+                                               $this->loadPlugin( $val[0], '' );
                                        } elseif ( count( $val ) === 2 ) {
                                                $this->loadPlugin( $val[0], $val[1] );
                                        } else {
index fba01af..5259ec9 100644 (file)
@@ -305,8 +305,6 @@ return [
                "PhanParamSignatureMismatch",
                // approximate error count: 7
                "PhanParamSignatureMismatchInternal",
-               // approximate error count: 2
-               "PhanParamTooFew",
                // approximate error count: 308
                "PhanParamTooMany",
                // approximate error count: 3