From 7a79b47e719221b32fcc6cc0ef47bfce56cb15ba 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 --- 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 9b38812..3fb0b9e 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -659,7 +659,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 e1a52a2..46bc5c5 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -281,7 +281,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.7.0