From 97c98c6607fc3925bb5c9ed832e217f4ce0a4d90 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 23 Sep 2020 14:41:10 +0000 Subject: [PATCH] Bug 26516: Check if int before save This is how we handle it when modifying a biblio To test: To recreate: 1 - Add a new record to Koha making sure data is valid except 260$c: 198- 2 - Save the record 3 - It fails 4 - Apply patch 5 - restart all the things 6 - Repeat 7 - Success! --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 97fa95aeb1..3d9ae0c371 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2741,7 +2741,7 @@ sub _koha_add_biblio { $sth->execute( $frameworkcode, $biblio->{'author'}, $biblio->{'title'}, $biblio->{'subtitle'}, $biblio->{'medium'}, $biblio->{'part_number'}, $biblio->{'part_name'}, $biblio->{'unititle'}, - $biblio->{'notes'}, $biblio->{'serial'}, $biblio->{'seriestitle'}, $biblio->{'copyrightdate'}, + $biblio->{'notes'}, $biblio->{'serial'}, $biblio->{'seriestitle'}, $biblio->{'copyrightdate'} ? int($biblio->{'copyrightdate'}) : undef, $biblio->{'abstract'} ); -- 2.11.0