Koha-clms/Koha/Patron
emlam 148eec6bb3 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@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dae5607fd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f067a82e3a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-08-18 13:50:43 +00:00
..
Attribute
…
Password Bug 31739: Password recovery from staff fails if previous expired reset-entry exists. 2022-10-24 14:12:16 -03:00
Restriction Bug 31095: Remove keyed_on_code 2023-02-01 15:36:12 +00:00
Attribute.pm
…
Attributes.pm
…
Categories.pm
…
Category.pm Bug 34435: Remove side effect from get_password_expiry_date 2023-08-18 13:50:43 +00:00
Consent.pm
…
Consents.pm
…
Debarments.pm Bug 31095: Remove GetDebarments from Koha::Patron::Debarments 2023-02-01 15:39:29 +00:00
Discharge.pm
…
Files.pm
…
HouseboundProfile.pm Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset 2022-02-09 15:36:23 -10:00
HouseboundProfiles.pm
…
HouseboundRole.pm
…
HouseboundRoles.pm
…
HouseboundVisit.pm
…
HouseboundVisits.pm
…
Image.pm
…
Images.pm
…
Message.pm
…
Messages.pm
…
Modification.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Modifications.pm
…
Relationship.pm Bug 33671: Update POD, remove unneeded check in relationship->guarantor 2023-05-15 12:23:29 +00:00
Relationships.pm
…
Restriction.pm Bug 31095: (QA follow-up) Fix POD 2023-02-01 15:40:26 +00:00
Restrictions.pm Bug 31095: (QA follow-up) Fix POD 2023-02-01 15:40:26 +00:00