diff --git a/classes/JATS.inc.php b/classes/JATS.inc.php index 60b1690..686e0eb 100644 --- a/classes/JATS.inc.php +++ b/classes/JATS.inc.php @@ -106,9 +106,12 @@ public static function getJournalMetaPubDate(DOMDocument $origDocument, $context $year = $origDocument->createElement('year', date('Y', $timestamp)); $pubDate->appendChild($year); + $issue = $issueDao->getBySubmissionId($submission->getId(), $context->getId()); - $volume = $origDocument->createElement('volume', $issue->getVolume()); - $pubDate->appendChild($volume); + if($issue) { + $volume = $origDocument->createElement('volume', $issue->getVolume()); + $pubDate->appendChild($volume); + } if ($firstPage) { $pubDate->appendChild($origDocument->createElement('fpage',$firstPage));