diff --git a/libraries/import/ods.php b/libraries/import/ods.php index 49408f652..90160160e 100644 --- a/libraries/import/ods.php +++ b/libraries/import/ods.php @@ -13,6 +13,13 @@ if (! defined('PHPMYADMIN')) { exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -66,9 +73,7 @@ unset($data); /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string diff --git a/libraries/import/xml.php b/libraries/import/xml.php index e152a9587..ce20fe795 100644 --- a/libraries/import/xml.php +++ b/libraries/import/xml.php @@ -12,6 +12,13 @@ if (! defined('PHPMYADMIN')) { exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -59,9 +66,7 @@ unset($data); /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string