0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-27 13:55:45 +00:00

php 74 compat

This commit is contained in:
Simone Dotto 2025-08-04 11:24:48 +02:00
parent 1a95da7062
commit 007c8f1cba

View File

@ -76,8 +76,8 @@ class SubitoBridge extends BridgeAbstract
$query_img = ''; $query_img = '';
foreach ($dom->find('script[type=application/ld+json]') as $json) { foreach ($dom->find('script[type=application/ld+json]') as $json) {
$ld_json = json_decode($json->innertext()); $ld_json = json_decode($json->innertext());
if (property_exists($ld_json, '@graph') && count($ld_json->{'@graph'}) > 0) { 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 $query_img = explode('?', $ld_json->{'@graph'}[0]->contentUrl)[1]; // i pick the first query string, to use for all images
break; break;
} }
} }