We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7aac043 commit 9b3e083Copy full SHA for 9b3e083
bridges/EuronewsBridge.php
@@ -102,7 +102,13 @@ private function getItemContent($url)
102
foreach ($json['@graph'] as $item) {
103
if ($item['@type'] == 'NewsArticle') {
104
if (array_key_exists('author', $item)) {
105
- $author = $item['author']['name'];
+ if (is_array($item['author'])) {
106
+ $author = implode(', ', array_map(function ($e) {
107
+ return $e['name'];
108
+ }, $item['author']));
109
+ } elseif (array_key_exists('name', $item['author'])) {
110
+ $author = $item['author']['name'];
111
+ }
112
}
113
if (array_key_exists('image', $item)) {
114
$content .= '<figure>';
0 commit comments