From 20c392b14555efca5707cd136fc2dd7f4131f1c9 Mon Sep 17 00:00:00 2001 From: frederik Date: Wed, 10 Jul 2024 20:42:38 +0200 Subject: [PATCH] fix: return early, if the photo is null everything wil fail anyway --- scripts/common.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/common.php b/scripts/common.php index 103d658..98c9c35 100644 --- a/scripts/common.php +++ b/scripts/common.php @@ -236,6 +236,8 @@ class Flickr { } } + if ($photo === null) return; + $license_url = "https://api.flickr.com/services/rest/?method=flickr.photos.getInfo&api_key=" . $this->flickr_api_key . "&photo_id=" . $photo["id"] . "&format=json&nojsoncallback=1"; $license_response = file_get_contents($license_url); $license_id = json_decode($license_response, true)["photo"]["license"];