https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307

Andreas Roussos <arouss1...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|koha-b...@lists.koha-commun |arouss1...@gmail.com
                   |ity.org                     |
                URL|                            |/cgi-bin/koha/members/membe
                   |                            |r.pl

--- Comment #1 from Andreas Roussos <arouss1...@gmail.com> ---
I'm no Perl expert but here's what I've found so far in my attempt
to debug this.

members/memberentry.pl in the current master (0254fd7):

372 if ( ($op eq 'modify' || $op eq 'insert' || $op eq 'save'|| $op eq
'duplicate') and ($step == 0 or $step == 3 )){
373     unless ($newdata{'dateexpiry'}){
374         my $patron_category = Koha::Patron::Categories->find(
$newdata{categorycode} );
375         $newdata{'dateexpiry'} = $patron_category->get_expiry_date(
$newdata{dateenrolled} );
376     }
377 }

The problem in line 375 is that the value of the $patron_category
variable is undefined, because at line 374 $newdata{categorycode}
comes from $input->param(), as per the comment at line 168. Since
no 'categorycode' value is passed in the URL, the call to
Koha::Patron::Categories->find() fails.

So, it seems that the easy fix is to add the categorycode in the URL.
It's trivial to fix so I'll provide a patch soon.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to