Fix PHP Notice in new OEmbed class
This commit is contained in:
parent
69df67740c
commit
60d4c6b86e
|
@ -100,7 +100,7 @@ class OEmbed
|
||||||
|
|
||||||
$txt = trim($txt);
|
$txt = trim($txt);
|
||||||
|
|
||||||
if ($txt[0] != "{") {
|
if (!$txt || $txt[0] != "{") {
|
||||||
$txt = '{"type":"error"}';
|
$txt = '{"type":"error"}';
|
||||||
} else { //save in cache
|
} else { //save in cache
|
||||||
$j = json_decode($txt);
|
$j = json_decode($txt);
|
||||||
|
|
Loading…
Reference in a new issue