diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 05f7ca5640..bcc84db83a 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -917,11 +917,8 @@ sub CanUserUseBudget { if (not ref $borrower) { $borrower = Koha::Patrons->find( $borrower ); - if ( $borrower ) { - $borrower = $borrower->unblessed; - } else { - return 0; - } + return 0 unless $borrower; + $borrower = $borrower->unblessed; } if (not ref $budget) { $budget = GetBudget($budget); @@ -1005,11 +1002,8 @@ sub CanUserModifyBudget { if (not ref $borrower) { $borrower = Koha::Patrons->find( $borrower ); - if ( $borrower ) { - $borrower = $borrower->unblessed; - } else { - return 0; - } + return 0 unless $borrower; + $borrower = $borrower->unblessed; } if (not ref $budget) { $budget = GetBudget($budget);