Handle array
This commit is contained in:
parent
d54cf9cc21
commit
4e02c347b6
|
@ -1131,6 +1131,8 @@ class ParseUrl
|
||||||
$content = JsonLD::fetchElement($jsonld, 'logo', 'url', '@type', 'ImageObject');
|
$content = JsonLD::fetchElement($jsonld, 'logo', 'url', '@type', 'ImageObject');
|
||||||
if (!empty($content) && is_string($content)) {
|
if (!empty($content) && is_string($content)) {
|
||||||
$jsonldinfo['publisher_img'] = trim($content);
|
$jsonldinfo['publisher_img'] = trim($content);
|
||||||
|
} elseif (!empty($content) && is_array($content)) {
|
||||||
|
$jsonldinfo['publisher_img'] = trim($content[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = JsonLD::fetchElement($jsonld, 'brand', 'name', '@type', 'Organization');
|
$content = JsonLD::fetchElement($jsonld, 'brand', 'name', '@type', 'Organization');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user