Unpack arrays on variadic arguments

This avoids extra handling in the function to unpack an array

Change-Id: I93277599bc8125e23fca53d43a728fb7e9e39aad
This commit is contained in:
Umherirrender 2019-06-29 17:17:33 +02:00
parent 7a08b3a13e
commit 54190757bb
4 changed files with 4 additions and 4 deletions

View file

@ -292,7 +292,7 @@ class LinkFilter {
// The constant prefix is smaller than el_index_60, so we use a LIKE
// for a prefix search.
return [
"{$p}_index_60" . $db->buildLike( [ $index, $db->anyString() ] ),
"{$p}_index_60" . $db->buildLike( $index, $db->anyString() ),
"{$p}_index" . $db->buildLike( $like ),
];
}

View file

@ -79,7 +79,7 @@ class MWException extends Exception {
$res = false;
if ( $this->useMessageCache() ) {
try {
$res = wfMessage( $key, $params )->text();
$res = wfMessage( $key, ...$params )->text();
} catch ( Exception $e ) {
}
}

View file

@ -199,7 +199,7 @@ class MWExceptionRenderer {
// FIXME: Keep logic in sync with MWException::msg.
try {
$res = wfMessage( $key, $params )->text();
$res = wfMessage( $key, ...$params )->text();
} catch ( Exception $e ) {
$res = wfMsgReplaceArgs( $fallback, $params );
// If an exception happens inside message rendering,

View file

@ -258,7 +258,7 @@ class LogPager extends ReverseChronologicalPager {
$params[] = $db->anyString();
}
array_pop( $params ); // Get rid of the last % we added.
$this->mConds[] = 'log_title' . $db->buildLike( $params );
$this->mConds[] = 'log_title' . $db->buildLike( ...$params );
} elseif ( $pattern && !$wgMiserMode ) {
$this->mConds[] = 'log_title' . $db->buildLike( $title->getDBkey(), $db->anyString() );
$this->pattern = $pattern;