From b7cfaca2d8ddb77a144b6990589dd88668d20829 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 7 Feb 2023 18:52:43 -0800 Subject: [PATCH] controller: add type casts for getPreviewFromImageList --- lib/Controller/PlacesController.php | 4 ++-- lib/Controller/TagsController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Controller/PlacesController.php b/lib/Controller/PlacesController.php index 8dd1b5d2..4d93c89b 100644 --- a/lib/Controller/PlacesController.php +++ b/lib/Controller/PlacesController.php @@ -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)); } } diff --git a/lib/Controller/TagsController.php b/lib/Controller/TagsController.php index 54ac632a..8e369492 100644 --- a/lib/Controller/TagsController.php +++ b/lib/Controller/TagsController.php @@ -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)); } }