mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-27 09:42:39 +00:00
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: I2f17c7e8c6365795f7a54738b0e607b6f35c9df2
This commit is contained in:
parent
198b3e7f68
commit
871cb29005
|
@ -71,7 +71,7 @@ class SearchResultProvideThumbnailHookHandler implements SearchResultProvideThum
|
||||||
* @param array &$results Placeholder for result. $pageId => SearchResultThumbnail
|
* @param array &$results Placeholder for result. $pageId => SearchResultThumbnail
|
||||||
* @param int|null $size size of thumbnail height and width in points
|
* @param int|null $size size of thumbnail height and width in points
|
||||||
*/
|
*/
|
||||||
public function onSearchResultProvideThumbnail( array $pageIdentities, &$results, int $size = null ): void {
|
public function onSearchResultProvideThumbnail( array $pageIdentities, &$results, ?int $size = null ): void {
|
||||||
$fileNamesByPageId = $this->getFileNamesByPageId( $pageIdentities );
|
$fileNamesByPageId = $this->getFileNamesByPageId( $pageIdentities );
|
||||||
$results ??= [];
|
$results ??= [];
|
||||||
foreach ( $fileNamesByPageId as $pageId => $fileName ) {
|
foreach ( $fileNamesByPageId as $pageId => $fileName ) {
|
||||||
|
|
Loading…
Reference in a new issue