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)); } }