From e891abd92f87f48b647e3f6b613fdf2319651806 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Tue, 9 Apr 2024 13:55:17 +0200 Subject: [PATCH] Fix warnings about accessing unitialized variable in ad member service lib/ldap_fluff/ad_member_service.rb:29: warning: instance variable @domain_functionality not initialized --- lib/ldap_fluff/ad_member_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldap_fluff/ad_member_service.rb b/lib/ldap_fluff/ad_member_service.rb index 6c86b5b..3a12f70 100644 --- a/lib/ldap_fluff/ad_member_service.rb +++ b/lib/ldap_fluff/ad_member_service.rb @@ -26,7 +26,7 @@ def find_user_groups(uid) # return the domain functionality level, default to 0 def _get_domain_func_level - return @domain_functionality unless @domain_functionality.nil? + return @domain_functionality if defined?(@domain_functionality) @domain_functionality = 0