[Koha-patches] [PATCH] fix crash when attempting login as user w/o 'catalogue' permission
Galen Charlton
galen.charlton at liblime.com
Thu Apr 10 18:37:48 CEST 2008
---
C4/Auth.pm | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index ec0fe59..5c69ab3 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} );
--
1.5.5.rc0.16.g02b00
More information about the Koha-patches
mailing list