From 88eb0323d7bde5bc91b7c58bce2848fb502eb076 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 22 Apr 2015 14:58:05 -0300 Subject: [PATCH] Bug 13419: (QA followup) remove useless warnings Signed-off-by: Tomas Cohen Arazi --- C4/Auth.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index f5e3316b0c..0e1b03f233 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1949,11 +1949,13 @@ sub haspermission { if ( $subperm eq '*' ) { return 0 unless ( $flags->{$module} == 1 or ref( $flags->{$module} ) ); } else { - return 0 unless ( $flags->{$module} == 1 or + return 0 unless ( + ( defined $flags->{$module} and + $flags->{$module} == 1 ) + or ( ref( $flags->{$module} ) and exists $flags->{$module}->{$subperm} and - $flags->{$module}->{$subperm} == 1 - ) + $flags->{$module}->{$subperm} == 1 ) ); } } -- 2.39.5