Unpack arrays on variadic arguments
This avoids extra handling in the function to unpack an array Change-Id: I93277599bc8125e23fca53d43a728fb7e9e39aad
This commit is contained in:
parent
7a08b3a13e
commit
54190757bb
4 changed files with 4 additions and 4 deletions
|
|
@ -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 ),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue