From: Erik Bernhardson Date: Thu, 15 Dec 2016 19:33:43 +0000 (-0800) Subject: Fix two instances of calling function with too few args X-Git-Tag: 1.31.0-rc.0~4573 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=41f9c933b31ff7e768174a436e88c079fb33dda6;p=lhc%2Fweb%2Fwiklou.git 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 --- 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