From 64e417850da2877ee232e277ce443ccec18e3f11 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 (cherry picked from commit ec96a0cb3f25f53fbe14f6c93a8d28b48d3b7286) Signed-off-by: Julian Maurice --- 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 420db724f1..71bf7a45f3 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -651,7 +651,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 2dbdb45a8c..31d8eaa104 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 &&