From a24ed7bc41862271a39fa4119c9a7bf0e7128157 Mon Sep 17 00:00:00 2001 From: Yadd Date: Tue, 4 May 2021 15:50:38 +0200 Subject: [PATCH] Fix GrantSession rules sort --- .../lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm index 03b6d18f2..102a38956 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm @@ -36,7 +36,7 @@ sub run { sub sortByComment { my $A = ( $a =~ /^.*?##(.*)$/ )[0]; my $B = ( $b =~ /^.*?##(.*)$/ )[0]; - return !$A ? 1 : !$B ? -1 : $A cmp $B; + return !( $A or $B ) ? $a cmp $b : !$A ? 1 : !$B ? -1 : $A cmp $B; } # Avoid display notification if AuthResult is not null