Skip to content

Commit

Permalink
fix throwing error when cover URL is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrause committed Dec 1, 2021
1 parent 3270f71 commit 7eec99b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RSCIExportPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ protected function _uploadZip($issueId, $xml)
$coverUrl = $issue->getLocalizedCoverImageUrl();
$coverUrlParts = explode('/', $coverUrl);
$coverName = end($coverUrlParts);
$fileManager->copyFile($coverUrl, $this->getExportPath() . $coverName);
if ($coverUrl != "")
$fileManager->copyFile($coverUrl, $this->getExportPath() . $coverName);

$request = Registry::get('request', false);
$context = $request->getContext();
Expand All @@ -174,7 +175,8 @@ protected function _uploadZip($issueId, $xml)
$fileParts = explode('.', $articleFilePath);
$fileExtension = end($fileParts);
$pages = $publication->getData('pages');
$fileManager->copyFile($articleFilePath, $this->getExportPath() . $pages . '.' . $fileExtension);
if ($articleFilePath != "")
$fileManager->copyFile($articleFilePath, $this->getExportPath() . $pages . '.' . $fileExtension);
}

// ZIP:
Expand Down

0 comments on commit 7eec99b

Please sign in to comment.