From 2e11001b8f00023200d417a86e4e9ccdf96ec71c Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Thu, 2 Dec 2021 22:10:11 +0000 Subject: [PATCH] [PLUGIN][Embed] Fix links --- plugins/Embed/Embed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Embed/Embed.php b/plugins/Embed/Embed.php index 79a05d1751..6098bd71bf 100644 --- a/plugins/Embed/Embed.php +++ b/plugins/Embed/Embed.php @@ -285,11 +285,11 @@ class Embed extends Plugin $metadata['title'] = $info->title; $metadata['description'] = $info->description; $metadata['author_name'] = $info->authorName; - $metadata['author_url'] = (string) $info->authorUrl; - $metadata['provider_name'] = $info->providerName; $root_url = parse_url($url); $root_url = "{$root_url['scheme']}://{$root_url['host']}"; - $metadata['provider_url'] = (string) ($info->providerUrl != '' ? $info->providerUrl : $root_url); + $metadata['author_url'] = $info->authorUrl ? (string)$info->authorUrl : $root_url; + $metadata['provider_name'] = $info->providerName; + $metadata['provider_url'] = (string)$info->providerUrl ?? $metadata['author_name']; if (!\is_null($info->image)) { $thumbnail_url = (string) $info->image;