Use explicit nullable type on parameter arguments (for PHP 8.4)

Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: I9cafaa51999fd2740da6c4fec9314fb9ace7c327
This commit is contained in:
Andre Klapper 2024-10-26 15:10:25 +02:00
parent 9ab4776312
commit 319d7bba52
2 changed files with 2 additions and 2 deletions

View file

@ -253,7 +253,7 @@ abstract class LuaEngine extends ScribuntoEngineBase {
* @param PPFrame|null $frame If null, an empty frame with no parent will be used
* @return ScopedCallback
*/
private function setupCurrentFrames( PPFrame $frame = null ) {
private function setupCurrentFrames( ?PPFrame $frame = null ) {
if ( !$frame ) {
$frame = $this->getParser()->getPreprocessor()->newFrame();
}

View file

@ -95,7 +95,7 @@ class Scribunto {
* @param Title|null &$forModule Module for which this is a doc page
* @return bool
*/
public static function isDocPage( Title $title, Title &$forModule = null ) {
public static function isDocPage( Title $title, ?Title &$forModule = null ) {
$docPage = wfMessage( 'scribunto-doc-page-name' )->inContentLanguage();
if ( $docPage->isDisabled() ) {
return false;