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)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 30 Dec 2015 14:03:52 +0000 (14:03 +0000)
commit002a2dcb1f1faed12a24fd820dc5fdaad60f3512
tree0e8f960d4633b33b0ad160b1e9dad8bfb6aa7409
parent976d715ac52a3c54cbc397d22127e773f977e0db
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>
C4/Letters.pm