Bug 17548: Fix step 1 of memberentry
This bug has been highlighted by bug 15407. The date limit check on the category code did not work on step 1. But after bug 15407 the script crashes with Can't call method "dateofbirthrequired" on an undefined value at /home/vagrant/kohaclone/members/memberentry.pl line 311. Test plan: - Edit "step 1" information of a patron (first 'Edit' on a patron detail page). - Save => Without this patch it BOOMs => With this patch, the info should be correctly saved Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
b2c59c7ff2
commit
9e82c921a6
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ if ($op eq 'save' || $op eq 'insert'){
|
||||||
|
|
||||||
if ( $newdata{dateofbirth} ) {
|
if ( $newdata{dateofbirth} ) {
|
||||||
my $age = GetAge($newdata{dateofbirth});
|
my $age = GetAge($newdata{dateofbirth});
|
||||||
my $borrowercategory = Koha::Patron::Categories->find($newdata{categorycode});
|
my $borrowercategory = Koha::Patron::Categories->find($categorycode);
|
||||||
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
|
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
|
||||||
if (($high && ($age > $high)) or ($age < $low)) {
|
if (($high && ($age > $high)) or ($age < $low)) {
|
||||||
push @errors, 'ERROR_age_limitations';
|
push @errors, 'ERROR_age_limitations';
|
||||||
|
|
Loading…
Reference in a new issue