From f020babef0efa089df7f5937587319d41d2ef01b Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 19 Sep 2016 12:38:43 -0400 Subject: [PATCH] Bug 17307: Smaller counter-patch Given that the issue is trying to call a method on something that isn't an object, because the category code doesn't exist, then why is it even trying to change the expiry date? A simple postfix if fixes it. Applied counter-patch by M. Tompsett. All three patron 'Edit' links mentioned in previous patch's test plan work fine. Signed-off-by: Andreas Roussos Signed-off-by: Benjamin Rokseth Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 413920b51c..1b100b0b99 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -372,7 +372,7 @@ if ($op eq 'save' || $op eq 'insert'){ if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save'|| $op eq 'duplicate') and ($step == 0 or $step == 3 )){ unless ($newdata{'dateexpiry'}){ my $patron_category = Koha::Patron::Categories->find( $newdata{categorycode} ); - $newdata{'dateexpiry'} = $patron_category->get_expiry_date( $newdata{dateenrolled} ); + $newdata{'dateexpiry'} = $patron_category->get_expiry_date( $newdata{dateenrolled} ) if $patron_category; } } -- 2.39.5