Koha-clms/t/db_dependent/Template/Plugin
Fridolin Somers d673f068ce Bug 29826: Manage call of Template Plugin Branches GetName() with null or empty branchcode
Bug 26587 added a concatenation that sends a warning if var is undef :
$ prove t/db_dependent/Template/Plugin/Branches.t
Use of uninitialized value $branchcode in concatenation (.) or string at /kohadevbox/koha/Koha/Template/Plugin/Branches.pm line 35.

This patch adds an early return empty string when GetName is called with $branchcode null or empty string.

Test plan :
1) Run t/db_dependent/Template/Plugin/Branches.t without patch
2) Run with the patch to see warning disappear

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2022-03-04 09:59:38 -05:00
..
AuthorisedValues.t
…
Branches.t Bug 29826: Manage call of Template Plugin Branches GetName() with null or empty branchcode 2022-03-04 09:59:38 -05:00
Categories.t
…
CirculationRules.t Bug 24154: (follow-up) Make parameter and variable more explicit, add tests 2021-05-10 10:27:53 +02:00
KohaDates.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
To.t
…