From 77c1251d03de8823d27f00c92e40c3227fcdc90a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 11 Jan 2018 22:34:02 -0500 Subject: [PATCH] Fallback to regular attachment display on oembed error --- src/Content/OEmbed.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index 3ab5b4fea..836f5a218 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -131,14 +131,12 @@ class OEmbed $j->embedurl = $embedurl; // If fetching information doesn't work, then improve via internal functions - if (($j->type == "error") || ($no_rich_type && ($j->type == "rich"))) { + if ($no_rich_type && ($j->type == "rich")) { $data = ParseUrl::getSiteinfoCached($embedurl, true, false); $j->type = $data["type"]; if ($j->type == "photo") { $j->url = $data["url"]; - //$j->width = $data["images"][0]["width"]; - //$j->height = $data["images"][0]["height"]; } if (isset($data["title"])) {