Merge pull request #10743 from annando/warning

Avoid warning when fetching page data
pull/10753/head
Hypolite Petovan 2021-09-22 07:47:57 -04:00 zatwierdzone przez GitHub
commit c9e30ac2c0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -1116,7 +1116,11 @@ class ParseUrl
}
$content = JsonLD::fetchElement($jsonld, 'image', 'url', '@type', 'ImageObject');
if (!empty($content)) {
if (!empty($content) && !is_string($content)) {
Logger::notice('Unexpected return value for the author image', ['content' => $content]);
}
if (!empty($content) && is_string($content)) {
$jsonldinfo['author_img'] = trim($content);
}