From: Hypolite Petovan Date: Tue, 2 Jan 2018 13:20:33 +0000 (-0500) Subject: Fix PHP Notice in new OEmbed class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60d4c6b86e8e9834e05006a272edcd8058c53e55;p=friendica.git Fix PHP Notice in new OEmbed class --- diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index 020d3b9b76..70be8fd738 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -100,7 +100,7 @@ class OEmbed $txt = trim($txt); - if ($txt[0] != "{") { + if (!$txt || $txt[0] != "{") { $txt = '{"type":"error"}'; } else { //save in cache $j = json_decode($txt);