A live bird collage card for your Home Assistant dashboard.
fix: return early, if the photo is null everything wil fail anyway
frederik20c392b14555
diff --git a/scripts/common.php b/scripts/common.phpindex 103d6581..98c9c356 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"];