From 7a2a241fa3efb5b376fb3740635c916e34d6a644 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 10 Apr 2008 11:37:48 -0500 Subject: [PATCH] fix crash when attempting login as user w/o 'catalogue' permission Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ec0fe5966a..5c69ab3fd8 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1341,7 +1341,11 @@ sub haspermission { return 0 unless ( $flags->{$module} == 1 or ref($flags->{$module}) ); } else { return 0 unless ( $flags->{$module} == 1 or - ( exists $flags->{$module}->{$subperm} and $flags->{$module}->{$subperm} == 1 ) ); + ( ref($flags->{$module}) and + exists $flags->{$module}->{$subperm} and + $flags->{$module}->{$subperm} == 1 + ) + ); } } else { return 0 unless ( $flags->{$module} ); -- 2.39.2