From ec96a0cb3f25f53fbe14f6c93a8d28b48d3b7286 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: Kyle M Hall --- 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 e87bf9a89f..ce85bd7b72 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -695,7 +695,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 e3c00c843b..7d0fae439f 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