Bug 15429 - sub _parseletter should not change referenced values
authorMarc Véron <veron@veron.ch>
Mon, 28 Dec 2015 09:29:17 +0000 (10:29 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 31 Dec 2015 09:48:39 +0000 (10:48 +0100)
commitcc3b2d05905b8c6c7000a0252e277c151c0eeae6
tree56ff4563ff8406f55f226ecab567e56948b45ecb
parent93b204f6b66ed9848a26accc632658f6d37e3ccd
Bug 15429 - sub _parseletter should not change referenced values

In C4/Letters.pm, sub _parseletter changes values that are passed by
reference. E.g. patron's expiry date can change from iso format to
syspref format, leading to strange behaviour in the calling routines
(see Bug 15423).

This patch makes sub _parseletter work on a copy of the referenced values.

(Submitted to get feedback - is this the way to go?)

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Good solution to real time bomb.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 002a2dcb1f1faed12a24fd820dc5fdaad60f3512)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Letters.pm