diff --git a/includes/Parser/Exception/UserVisibleException.php b/includes/Parser/Exception/UserVisibleException.php index f2ab42e5d..69ac10e1b 100644 --- a/includes/Parser/Exception/UserVisibleException.php +++ b/includes/Parser/Exception/UserVisibleException.php @@ -64,7 +64,7 @@ class UserVisibleException extends ExceptionBase { // abusefilter-exception-unknownfunction, abusefilter-exception-usebuiltin return new Message( 'abusefilter-exception-' . $this->mExceptionID, - array_merge( [ $this->mPosition ], $this->mParams ) + [ $this->mPosition, ...$this->mParams ] ); } diff --git a/includes/Parser/Exception/UserVisibleWarning.php b/includes/Parser/Exception/UserVisibleWarning.php index 01705989f..364c5228c 100644 --- a/includes/Parser/Exception/UserVisibleWarning.php +++ b/includes/Parser/Exception/UserVisibleWarning.php @@ -16,7 +16,7 @@ class UserVisibleWarning extends UserVisibleException { // abusefilter-parser-warning-match-empty-regex return new Message( 'abusefilter-parser-warning-' . $this->mExceptionID, - array_merge( [ $this->mPosition ], $this->mParams ) + [ $this->mPosition, ...$this->mParams ] ); } } diff --git a/includes/Variables/LazyVariableComputer.php b/includes/Variables/LazyVariableComputer.php index 61c9dc944..a96ceb2f5 100644 --- a/includes/Variables/LazyVariableComputer.php +++ b/includes/Variables/LazyVariableComputer.php @@ -229,7 +229,7 @@ class LazyVariableComputer { // this inference is ugly, but the name isn't accessible from here // and we only want this for debugging $textVar = $parameters['text-var']; - $varName = strpos( $textVar, 'old_' ) === 0 ? 'old_links' : 'all_links'; + $varName = str_starts_with( $textVar, 'old_' ) ? 'old_links' : 'all_links'; if ( $parameters['forFilter'] ?? false ) { $this->logger->debug( "Loading $varName from DB" ); $links = $this->getLinksFromDB( $article );