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)
committerFrédéric Demians <f.demians@tamil.fr>
Thu, 31 Dec 2015 17:34:11 +0000 (18:34 +0100)
commita7d0a998bcfe408c50a5e857ef9b2df7563bd267
treebcc2f71f60b53633f2b9db1692b3a6e40fa83002
parent4ad5decf4a06abd043566c5a5a6412133139de29
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>
(cherry picked from commit cc3b2d05905b8c6c7000a0252e277c151c0eeae6)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Letters.pm