diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index 7a76d70e91cebc52aeba7e3869366cd16690386e..98819475d872577d48a210c799d4476438cefc03 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -1624,6 +1624,7 @@ class SimpleSAML_Utilities {
 	 * Disable the loading of external entities in XML documents to prevent local and
 	 * remote file inclusion attacks. This is in most cases already disabled by default
 	 * in system libraries, but to be safe we explicitly disable it also.
+	 * @deprecated This function will be removed in SSP 2.0. Please use libxml_disable_entity_loader() instead.
 	 */
 	public static function disableXMLEntityLoader() {
 		/* Function only present in PHP >= 5.2.11 while we support 5.2+ */
diff --git a/www/_include.php b/www/_include.php
index 4e9b35541c3adbfced06cab3f719e903e90669a7..4b52a300bc139a40688bc7df8625c35c6384d723 100644
--- a/www/_include.php
+++ b/www/_include.php
@@ -108,4 +108,4 @@ if (!file_exists($configdir . '/config.php')) {
 /* Set the timezone. */
 SimpleSAML_Utilities::initTimezone();
 /* Disable XML external entity loading explicitly. */
-SimpleSAML_Utilities::disableXMLEntityLoader();
+libxml_disable_entity_loader();