From 46d288a61caea1541e0074051f5cff9e8d6b4f6e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 26 Jun 2018 12:37:19 -0300 Subject: [PATCH] Bug 20998: Simplify the conditional statement Signed-off-by: Jonathan Druart Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- members/member.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/members/member.pl b/members/member.pl index 2fc7fb462a..11cbc41a32 100755 --- a/members/member.pl +++ b/members/member.pl @@ -53,8 +53,13 @@ if ( $quicksearch and $searchmember ) { $branchcode = $userenv->{'branch'}; } my $patron = Koha::Patrons->find( { cardnumber => $searchmember } ); - if( ( $branchcode and $patron and $patron->branchcode eq $branchcode ) or ( not $branchcode and $patron ) ){ - print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber); + if ( + $patron + and ( ( $branchcode and $patron->branchcode eq $branchcode ) + or ( not $branchcode ) ) + ) + { + print $input->redirect( "/cgi-bin/koha/members/moremember.pl?borrowernumber=" . $patron->borrowernumber ); exit; } } -- 2.39.5