X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FItemType.pm;h=70d26908e5d4473b83e91618e68294c69102f890;hb=aec123114a69e0cf3e6184e7d0b0d5aceadb9bb3;hp=e66d9178071588120e2559bcd5e2a9c7f646f561;hpb=4c14cd317e92cb44aed69f09e99438f694ae32e5;p=koha.git diff --git a/C4/ItemType.pm b/C4/ItemType.pm index e66d917807..70d26908e5 100644 --- a/C4/ItemType.pm +++ b/C4/ItemType.pm @@ -73,12 +73,15 @@ C. sub all { my ($class) = @_; my $dbh = C4::Context->dbh; - return map { $class->new($_) } @{$dbh->selectall_arrayref( - # The itemtypes table is small enough for - # `SELECT *` to be harmless. - "SELECT * FROM itemtypes ORDER BY description", - { Slice => {} }, - )}; + + my @itypes; + for ( @{$dbh->selectall_arrayref( + "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} ) + { + utf8::encode($_->{description}); + push @itypes, $class->new($_); + } + return @itypes; }