]> git.koha-community.org Git - koha.git/commit
Bug 27549: "use of uninitialized value" warning on renew.pl
authorPetro Vashchuk <stalkernoid@gmail.com>
Mon, 25 Jan 2021 15:37:37 +0000 (17:37 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 5 Feb 2021 16:13:19 +0000 (17:13 +0100)
commitfa472369c034cbcda80f6025ab3fbdbed58bda7c
treed5bb16b2b9d28bc0298749eb4092ea51f27d3c6f
parent44d1675aaf1e602e12ccd669dad50a299654f89d
Bug 27549: "use of uninitialized value" warning on renew.pl

On the beginning we have empty "barcode" parameter for this form, but that not taken into account in regular expression  warning emitted: "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47." in renew.pl
Fixed by making $barcode to become an empty string by default.

To reproduce:
    1) Head over to the "Circulation -> Renew" page.
    2) Check intranet-error.log there will be a warning "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47".
    3) Apply the patch, refresh the "Renew" page.
    4) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.

Signed-off-by: David Nind <david@davidnind.com>
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 1af07787032275813e1e458cfed8504b482cd1c6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
circ/renew.pl