[Koha-bugs] [Bug 29826] Useless warning in t/db_dependent/Template/Plugin/Branches.t

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 20 00:26:45 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29826

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #129208|0                           |1
        is obsolete|                            |

--- Comment #2 from David Nind <david at davidnind.com> ---
Created attachment 129630
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129630&action=edit
Bug 29826: Remove warning in t/db_dependent/Template/Plugin/Branches.t

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
without $branchcode

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 at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list