From 06f575dcca99ce8cd3058e84b47cfa44262a0843 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 Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy --- 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 e87bf9a..ce85bd7 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 e3c00c8..7d0fae4 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 && -- 1.7.10.4