[Koha-bugs] [Bug 34435] get_password_expiry_date should not modify its parameter

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 27 18:55:01 CEST 2023


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

--- Comment #2 from Emily Lamancusa <emily.lamancusa at montgomerycountymd.gov> ---
Created attachment 153999
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153999&action=edit
Bug 34435: Remove side effect from get_password_expiry_date

If get_password_expiry_date is passed a DateTime object
as a parameter, it modifies and returns the original
object. This can create possible side effects.

This patch modifies get_password_expiry_date to clone the
DateTime object that it receives as a parameter and
return the modified clone, so that object references can
be passed in safely.

To test:
prove t/db_dependent/Koha/Patron/Category.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list