The warning: [WARN] Use of uninitialized value $2 in split at /kohadevbox/koha/C4/Record.pm line 924. appears in the plack-opac-error.log file. To reproduce in KTD: 1. Observe plack-opac-error.log 2. In OPAC go to record with one word author like Aristophanes, Aristotle or Xenophon (biblionumbers: 64, 176, 254) 3. Show it in any of "detail" view (Normal, MARC, ISBD) 4. Warning appears in plack-opac-error.log It happens during the preparation of data for the "Cite" feature in OPAC. The warning appears because of the overlap of two regular expression matches - the variable captured from the first regular expression match is changed (by the second regular expression match) before it is used.
Created attachment 192011 [details] [review] Bug 41706: "Use of uninitialized value..." warning in C4/Record.pm The warning: [WARN] Use of uninitialized value $2 in split at /kohadevbox/koha/C4/Record.pm line 924. appears in the plack-opac-error.log file. It happens during the preparation of data for the "Cite" feature in OPAC for some of author's fields. To test: ======== 1. Observe plack-opac-error.log. 2. In OPAC go to record with one word author like Aristophanes, Aristotle or Xenophon (biblionumbers: 64, 176, 254). 3. Show it in any of "detail" view (Normal, MARC, ISBD). 4. Warning appears in plack-opac-error.log. 5. Apply the patch; restart_all. 6. Repeat 2-3. Warning doesn't appear. Sponsored-by: Ignatianum University in Cracow