Fix exception "Argument #2 ($jsonld) must be of type array, string given"

This commit is contained in:
Michael 2025-01-19 13:24:59 +00:00
parent cd79d26ed5
commit d42b31bee6

View file

@ -455,7 +455,8 @@ class ParseUrl
$list = $xpath->query("//script[@type='application/ld+json']");
foreach ($list as $node) {
if (!empty($node->nodeValue)) {
if ($jsonld = json_decode($node->nodeValue, true)) {
$jsonld = json_decode($node->nodeValue, true);
if (is_array($jsonld)) {
$siteinfo = self::parseParts($siteinfo, $jsonld);
}
}