Bug 29040: Remove warning from the itemtype edit view

Use of uninitialized value $interface in concatenation (.) or string at /kohadevbox/koha/C4/Languages.pm line 121.

We are expecting "intranet" or "opac, here we sent undef which raises a
warning.
For no change in behaviour we can send "both" (or whatever different
than "intranet" and "opac").

Test plan:
Hit /cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
Notice that the warning does no longer appear in the logs with the patch
applied.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2021-11-19 14:54:58 +01:00 committed by Fridolin Somers
parent c403c972ca
commit a3594f160a

View file

@ -60,7 +60,7 @@ if ( $op eq 'add_form' ) {
my $parent_types = Koha::ItemTypes->search({parent_type=>undef,itemtype => {'!='=>$itemtype_code}});
my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) );
my $searchcategory = GetAuthorisedValues("ITEMTYPECAT");
my $translated_languages = C4::Languages::getTranslatedLanguages( undef , C4::Context->preference('template') );
my $translated_languages = C4::Languages::getTranslatedLanguages( "both", C4::Context->preference('template') );
$template->param(
itemtype => $itemtype,
parent_type => $parent_type,