mirror of
https://github.com/friendica/friendica
synced 2025-03-14 07:48:27 +00:00
Merge pull request #14837 from annando/fatal
Fixes fatal error "Return value must be of type Friendica\Object\OEmbed, string returned"
This commit is contained in:
commit
ecfb82693d
1 changed files with 5 additions and 2 deletions
|
@ -184,13 +184,16 @@ class OEmbed
|
|||
|
||||
$eventDispatcher = DI::eventDispatcher();
|
||||
|
||||
$oembed_data = ['url' => $embedurl];
|
||||
$oembed_data = [
|
||||
'url' => $embedurl,
|
||||
'data' => $oembed,
|
||||
];
|
||||
|
||||
$oembed_data = $eventDispatcher->dispatch(
|
||||
new ArrayFilterEvent(ArrayFilterEvent::OEMBED_FETCH_END, $oembed_data),
|
||||
)->getArray();
|
||||
|
||||
return $oembed_data['url'] ?? $embedurl;
|
||||
return $oembed_data['data'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue