Fix PHP Notice in new OEmbed class

This commit is contained in:
Hypolite Petovan 2018-01-02 08:20:33 -05:00
parent 69df67740c
commit 60d4c6b86e

View file

@ -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);