diff --git a/libraries/import/ods.php b/libraries/import/ods.php index f0a57fcf7..dcc6a5153 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' */ @@ -64,9 +71,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 f966a3f2c..9298225dd 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