Bug 11732: Eliminate warning on undefined branchcode
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 10 Feb 2014 12:28:16 +0000 (13:28 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 19 May 2014 15:29:41 +0000 (17:29 +0200)
commitd93700833b0c816731e2675cc436979358c0081f
tree5837606305465d4582904050ce12171e1828d870
parent91c7ea239f93c838f5f3b306ef2fee6255f1fef2
Bug 11732: Eliminate warning on undefined branchcode

When you run the Reserves test, you have the warnings:
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 138.
Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 148.
This patch removes that warning.

Test plan:
Run the Reserves.t again.

Revised Test Plan
-----------------
Run the following on the command line prompt before and after
applying the patch:
    perl -e "use C4::Letters; *C4::Context::userenv= sub { return {} }; my \$blah=C4::Letters::getletter('circulation','DUE', 'BRA');"
Before the patch there will be errors (as above), after there will not.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
IndependentBranches must be on.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 518870223669e8d4e3893401d18da0610ac1f6c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Letters.pm