Skip to content

Commit

Permalink
Bug 16356: Fix Error 500 when returning an item which itemtype is not…
Browse files Browse the repository at this point in the history
… in itemtypes table

  Test plan :
    * Find an item with itemtype (itype or bilbioitems.itemtype
      depending on syspref) does not exist in itemtypes table
    * If necessary, change itemtype of one of your item
    * Check out this item
    * Try to check it in, you've got a 500 Error and item is not
      returned

    With the patch
    * Try to check your item in. Item is correctly returned

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
  • Loading branch information
SMeynieux authored and jajm committed Apr 28, 2016
1 parent 372868a commit 4c20eff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions C4/ItemType.pm
Expand Up @@ -116,6 +116,7 @@ sub get {
my $data = $dbh->selectrow_hashref(
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
);
return unless defined $data;
return $class->new($data);
}

Expand Down

0 comments on commit 4c20eff

Please sign in to comment.