From be5afe601147e3a5fd839760d1a6b0256a731594 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Thu, 1 Feb 2018 17:10:08 +0200 Subject: [PATCH] Bug 19365 - link_bibs_to_authorities.pl doesn't work with Elasticsearch Fix the copyrightdate cast when it's empty. --- C4/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 4085465..151cfc9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3006,7 +3006,7 @@ sub _koha_modify_biblio { $sth->execute( $frameworkcode, $biblio->{'author'}, $biblio->{'title'}, $biblio->{'unititle'}, $biblio->{'notes'}, - $biblio->{'serial'}, $biblio->{'seriestitle'}, int($biblio->{'copyrightdate'}), $biblio->{'abstract'}, $biblio->{'biblionumber'} + $biblio->{'serial'}, $biblio->{'seriestitle'}, $biblio->{'copyrightdate'} ? int($biblio->{'copyrightdate'}) : undef, $biblio->{'abstract'}, $biblio->{'biblionumber'} ) if $biblio->{'biblionumber'}; if ( $dbh->errstr || !$biblio->{'biblionumber'} ) { -- 2.7.4