Koha/circ
Joonas Kylmälä 8e25fa1dc5
Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl
With UseCashRegisters syspref disabled going to the page
/cgi-bin/koha/circ/set-library.pl in staff interface and setting a
library gives the following errors in plack-intranet-error.log:

Use of uninitialized value $register_id in string ne at /kohadevbox/koha/circ/set-library.pl line 79.
Use of uninitialized value $referer in pattern match (m//) at /kohadevbox/koha/circ/set-library.pl line 114.

In the if clause $userenv_register_id appears to be typoed, it should have
been $register_id as $userenv_register_id is always defined. As for the
$referer variable, it is undef if there is no referer so let's just initialize
it to an empty string for the regex so it doesn't give the warning.

To test:
 1) Go directly to /cgi-bin/koha/circ/set-library.pl by typing it in
    the URL bar and set a library
 2) Make sure plack-intranet-error.log doesn't contain the above mentioned errors
    after applying this patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-22 08:09:34 -03:00
..
add_message.pl
article-request-slip.pl Bug 29771: Scalar context for split 2022-03-08 23:03:34 -10:00
article-requests.pl
bookcount.pl
branchoverdues.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
branchtransfers.pl Bug 30409: barcodedecode() should always trim barcode 2022-06-14 07:54:58 -03:00
checkout-notes.pl
circulation-home.pl
circulation.pl Bug 23681: Move to ::Patron::Restriction::Type(s) 2022-08-25 08:50:35 -03:00
curbside_pickups.pl Bug 30965: Add patron autocomplete search to curbside pickups 2022-08-01 09:02:44 -03:00
del_message.pl
hold-transfer-slip.pl
offline-mf.pl
offline.pl
on-site_checkouts.pl
overdue.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
pendingreserves.pl Bug 30935: Holds to pull shows wrong first patron 2022-07-19 09:40:24 -03:00
renew.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
request-article.pl Bug 30094: Make the patron search from request-article.pl use the REST API 2022-04-04 09:47:00 +02:00
reserveratios.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
returns.pl Bug 31395: Only try to cancel holds if item found 2022-08-19 09:56:43 -03:00
set-library.pl Bug 28167: Remove uninitialized variable warnings from circ/set-library.pl 2022-09-22 08:09:34 -03:00
transfer-slip.pl
transfers_to_send.pl Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
transferstoreceive.pl Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl 2022-08-26 15:42:52 -03:00
view_holdsqueue.pl
waitingreserves.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00