summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes')
-rw-r--r--plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php b/plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php
index cfe37f85..26018f61 100644
--- a/plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php
+++ b/plugins/jetpack/modules/shortcodes/class.filter-embedded-html-objects.php
@@ -242,6 +242,10 @@ class Filter_Embedded_HTML_Objects {
}
static function get_attrs( $html ) {
+ if ( ! ( function_exists( 'libxml_use_internal_errors' ) && function_exists( 'simplexml_load_string' ) ) ) {
+ trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
+ return array();
+ }
// We have to go through DOM, since it can load non-well-formed XML (i.e. HTML). SimpleXML cannot.
$dom = new DOMDocument;
// The @ is not enough to suppress errors when dealing with libxml,
@@ -286,4 +290,4 @@ class Filter_Embedded_HTML_Objects {
return $attrs;
}
-} \ No newline at end of file
+}