From 007c8f1cba7d69620eb84d2683dd14ff73a361e3 Mon Sep 17 00:00:00 2001 From: Simone Dotto Date: Mon, 4 Aug 2025 11:24:48 +0200 Subject: [PATCH] php 74 compat --- bridges/SubitoBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/SubitoBridge.php b/bridges/SubitoBridge.php index 5e34517b..d8beaad0 100644 --- a/bridges/SubitoBridge.php +++ b/bridges/SubitoBridge.php @@ -76,8 +76,8 @@ class SubitoBridge extends BridgeAbstract $query_img = ''; foreach ($dom->find('script[type=application/ld+json]') as $json) { $ld_json = json_decode($json->innertext()); - if (property_exists($ld_json, '@graph') && count($ld_json->{'@graph'}) > 0) { - $query_img = explode('?', $ld_json?->{'@graph'}[0]?->contentUrl)[1]; // i pick the first query string, to use for all images + if (property_exists($ld_json, '@graph') && count($ld_json->{'@graph'}) > 0 && property_exists($ld_json->{'@graph'}[0], 'contentUrl')) { + $query_img = explode('?', $ld_json->{'@graph'}[0]->contentUrl)[1]; // i pick the first query string, to use for all images break; } }