From 15adfa52982f6d581c14ddff8ec34819e9267233 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 10 Dec 2012 22:50:34 +0000 Subject: [PATCH] Check for DOMDocument when parsing oEmbed XML responses. git-svn-id: http://core.svn.wordpress.org/branches/3.5@23161 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-oembed.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index a3eab801a1..46d5f6290d 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -220,6 +220,9 @@ class WP_oEmbed { return false; } + if ( ! class_exists( 'DOMDocument' ) ) + return false; + $errors = libxml_use_internal_errors( true ); $old_value = null; if ( function_exists( 'libxml_disable_entity_loader' ) ) {