From 9f247faaed3275931222a81f20c007ee07ac2dbd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Apr 2016 12:03:49 +0100 Subject: [PATCH] Bug 14598: Fix warning from effective_itemtype Signed-off-by: Marcel de Rooy Signed-off-by: Mason James --- Koha/Schema/Result/Item.pm | 2 +- t/db_dependent/Items.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index ba49ded3a9..8da21cdc0a 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -680,7 +680,7 @@ sub effective_itemtype { if ( $pref && $self->itype() ) { return $self->itype(); } else { - warn "item-level_itypes set but no itemtype set for item ($self->itemnumber)" + warn "item-level_itypes set but no itemtype set for item (".$self->itemnumber.")" if $pref; return $self->biblioitemnumber()->itemtype(); } diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index 81a48a3ca3..b878c73172 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -276,7 +276,7 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { $item->update(); my $effective_itemtype; warning_is { $effective_itemtype = $item->effective_itemtype() } - "item-level_itypes set but no itemtype set for item ($item->itemnumber)", + "item-level_itypes set but no itemtype set for item (".$item->itemnumber.")", '->effective_itemtype() raises a warning when falling back to bib-level'; ok( defined $effective_itemtype && -- 2.39.5