https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34117
--- Comment #8 from Emily Lamancusa <[email protected]> --- (In reply to Jonathan Druart from comment #7) > Sorry, I haven't seen Emily's comment! > > There is something weird here as well: > 105 sub get_expiry_date { > 109 $date = dt_from_string( $date ) unless ref $date; > > Which means get_expiry_date should deal with DateTime object correctly. Line 109 keeps the original object if one was passed, and creates a new object if a string was passed, right? And then in the next line... 110 return $date->add( months => $self->enrolmentperiod, end_of_month => 'limit' ); According to https://metacpan.org/pod/DateTime#Math-Methods: "Like the set methods, math related methods always return the object itself, to allow for chaining" So unless I'm misunderstanding the Perl from line 109, if get_expiry_date is passed an object, it updates and returns that same object, which memberentry.pl doesn't take into account in line 725: $data{dateexpiry} = $category->get_expiry_date( $data{dateenrolled} ); -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
