More foolproof code in getVideoOEmbed()

This commit is contained in:
Aleksei Miheev
2014-01-05 12:59:24 +00:00
parent 4100c54341
commit 193b7f4686

View File

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