controller: add type casts for getPreviewFromImageList

pull/397/head
Varun Patil 2023-02-07 18:52:43 -08:00
parent e19302c927
commit b7cfaca2d8
2 changed files with 4 additions and 4 deletions

View File

@ -90,8 +90,8 @@ class PlacesController extends ApiBase
shuffle($list);
// Get preview from image list
return $this->getPreviewFromImageList(array_map(static function ($item) {
return $item['fileid'];
return $this->getPreviewFromImageList(array_map(static function (&$item) {
return (int) $item['fileid'];
}, $list));
}
}

View File

@ -92,8 +92,8 @@ class TagsController extends ApiBase
shuffle($list);
// Get preview from image list
return $this->getPreviewFromImageList(array_map(static function ($item) {
return $item['fileid'];
return $this->getPreviewFromImageList(array_map(static function (&$item) {
return (int) $item['fileid'];
}, $list));
}
}