diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php
index 81d229c4903e2fc4d4e4c080b37ebf3ee1f9f38a..e49729cb479da49371f24416ecb54fd19ecb24ec 100644
--- a/modules/consentAdmin/www/consentAdmin.php
+++ b/modules/consentAdmin/www/consentAdmin.php
@@ -126,9 +126,11 @@ if($session->getIdP() != null) {
 }
 
 // Remove services, whitch have consent disabled
-foreach($idp_metadata['consent.disable'] AS $disable) {
-    if(array_key_exists($disable, $all_sp_metadata)) {
-        unset($all_sp_metadata[$disable]);
+if(isset($idp_metadata['consent.disable'])) {
+    foreach($idp_metadata['consent.disable'] AS $disable) {
+        if(array_key_exists($disable, $all_sp_metadata)) {
+            unset($all_sp_metadata[$disable]);
+        }
     }
 }