From 41f9c933b31ff7e768174a436e88c079fb33dda6 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Thu, 15 Dec 2016 11:33:43 -0800 Subject: [PATCH] Fix two instances of calling function with too few args 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 | 2 +- maintenance/backup.inc | 2 +- tests/phan/config.php | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/search/DummySearchIndexFieldDefinition.php b/includes/search/DummySearchIndexFieldDefinition.php index a2a6760192..3ee3ed5ad0 100644 --- a/includes/search/DummySearchIndexFieldDefinition.php +++ b/includes/search/DummySearchIndexFieldDefinition.php @@ -21,7 +21,7 @@ class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition { ]; foreach ( $this->subfields as $subfield ) { - $mapping['subfields'][] = $subfield->getMapping(); + $mapping['subfields'][] = $subfield->getMapping( $engine ); } return $mapping; diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 18c7f11fbf..befafc1d73 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -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 { diff --git a/tests/phan/config.php b/tests/phan/config.php index fba01af1ae..5259ec9ecd 100644 --- a/tests/phan/config.php +++ b/tests/phan/config.php @@ -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 -- 2.20.1