Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called
authorPetro Vashchuk <stalkernoid@gmail.com>
Thu, 9 Dec 2021 13:47:07 +0000 (15:47 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 16 Dec 2021 22:13:51 +0000 (12:13 -1000)
commit81bb6761a23bb0c68aee2bdc43a5b353b7f76157
treec1de5f89a30e0af10d02f02fdc77e0cadfff0d2e
parentde487dac12de0a63cfa46bfb31083bd131803787
Bug 29669: fix uninitialized value warnings when XSLTParse4Display is called

Wrong key 'xsl_filename' is present in opac-tags.pl and shelves.pl
(the only places where it is used in the code even) instead of
'xsl_syspref' that is actually used and this is the cause of those
warnings.

Also added honeypot to check if other calls in same way happens.
Honeypot probably not needed, review when QA in the Community.

To reproduce (shelves.pl):
1) Prepare some test list with items or use existing one.
2) Go to the lists page (koha/virtualshelves/shelves.pl),
notice multitude of new warnings in the "intranet-error.log" log file
that mostly have to do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Go back to same page and check it again, warns like that should not
appear in the log file anymore.

To reproduce (opac-tags.pl):
1) Go to the "my tags" page in OPAC and open "tag cloud".
2) Notice a bunch of new warnings in the log file that mostly have to
do with "Use of uninitialized value $xslsyspref".
3) Apply the patch.
4) Reload the page and check the log file again.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/XSLT.pm
opac/opac-tags.pl
virtualshelves/shelves.pl