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