From 23001ba5f74df6cde7db9b72b0147d72214b73b2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 29 Jan 2024 17:16:27 +0100 Subject: [PATCH] Bug 14670: Deal with empty publicatoin date Sponsored-by: Orex Digital Signed-off-by: Hugo Agud Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- C4/Record.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/C4/Record.pm b/C4/Record.pm index 644c3b61ca..700a8186f8 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -929,10 +929,12 @@ sub marc2cites { } $cites{$_} =~ s/([^\.])$/$1./ for keys %cites; - $cites{'Harvard'} .= ' (' . $publication{'date'} . '). '; - $cites{'Chicago'} .= ' ' . $publication{'date'} . '. '; - $cites{'MLA'} .= ' ' . $publication{'title'} . '. '; - $cites{'APA'} .= ' (' . $publication{'date'} . '). '; + if ( $publication{date} ) { + $cites{'Harvard'} .= ' (' . $publication{'date'} . '). '; + $cites{'Chicago'} .= ' ' . $publication{'date'} . '. '; + $cites{'MLA'} .= ' ' . $publication{'title'} . '. '; + $cites{'APA'} .= ' (' . $publication{'date'} . '). '; + } $cites{'Harvard'} .= $publication{'title'} . '. '; $cites{'Chicago'} .= $publication{'title'} . '. '; $cites{'MLA'} .= $publication{'place'} . ': ';