Fix PHP Notice in new OEmbed class
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user