Fix PHP Notice in new OEmbed class

pull/4157/head
Hypolite Petovan 2018-01-02 08:20:33 -05:00
parent 69df67740c
commit 60d4c6b86e
1 changed files with 1 additions and 1 deletions

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