More foolproof code in getVideoOEmbed()
This commit is contained in:
@@ -1308,8 +1308,7 @@ function getVideoOEmbed($xml_url)
|
||||
{
|
||||
// Load in the oEmbed XML
|
||||
$xml = curl_get($xml_url);
|
||||
if ($xml !== FALSE) {
|
||||
$oembed = @simplexml_load_string($xml);
|
||||
if ($xml !== FALSE && $oembed = @simplexml_load_string($xml)) {
|
||||
return html_entity_decode($oembed->html);
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user