]> git.koha-community.org Git - koha.git/commit
Bug 26784: Silence warns about comparing undefined values for MARC modification templates
authorNick Clemens <nick@bywatersolutions.com>
Thu, 22 Oct 2020 12:36:13 +0000 (12:36 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 13 Nov 2020 20:53:30 +0000 (20:53 +0000)
commit5b8544989846db705747ec0738ad24cddd012ad4
tree97f2efdebe56bc29b496437e2f3f0843fcc12e79
parent3a671b0ca6b414d62cd652dafa83d2828b7020a2
Bug 26784: Silence warns about comparing undefined values for MARC modification templates

This patch simply checks if conditionals are defined before comparing

We don't need to check actions because you cannot save an action without an action :-)

To test:
1 - Define several actions for a MARC modification template
2 - Ensure you have actions with no conditionals
3 - Tail the intranet logs
4 - Browse to Tools->MARC modification templates
5 - Click 'Edit actions' for the template you setup above
6 - Note warns like:
    [2020/10/22 12:30:18] [WARN] Use of uninitialized value in string eq at /kohadevbox/koha/tools/marc_modification_templates.pl line 127.
7 - Apply patch
8 - Restart all the things
9 - Edit actions again and note no more warns

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2dd19840449beadd1f1752bd8cc18f0163f7f8a4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
tools/marc_modification_templates.pl