[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
Mon Jul 31 17:06:29 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34435
Sam Lau <samalau at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #153999|0 |1
is obsolete| |
--- Comment #4 from Sam Lau <samalau at gmail.com> ---
Created attachment 154101
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154101&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
Signed-off-by: Sam Lau <samalau at gmail.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list