From 58e321c915e948cd717bbffe401757744eb6c9ec Mon Sep 17 00:00:00 2001 From: Dag Date: Mon, 17 Oct 2022 00:38:57 +0200 Subject: [PATCH] fix: flickr (#3104) --- bridges/FlickrBridge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bridges/FlickrBridge.php b/bridges/FlickrBridge.php index 99cd811d..48df9757 100644 --- a/bridges/FlickrBridge.php +++ b/bridges/FlickrBridge.php @@ -243,7 +243,8 @@ class FlickrBridge extends BridgeAbstract { $areas = []; - foreach ($model['sizes'] as $size) { + foreach ($model['sizes']['data'] as $size) { + $size = $size['data']; $areas[$size['width'] * $size['height']] = $size['url']; } @@ -255,7 +256,8 @@ class FlickrBridge extends BridgeAbstract $areas = []; $limit = 320 * 240; - foreach ($model['sizes'] as $size) { + foreach ($model['sizes']['data'] as $size) { + $size = $size['data']; $image_area = $size['width'] * $size['height']; if ($image_area >= $limit) {