diff --git a/OrcidProfilePlugin.php b/OrcidProfilePlugin.php index d931eed..609b832 100755 --- a/OrcidProfilePlugin.php +++ b/OrcidProfilePlugin.php @@ -764,7 +764,7 @@ public function sendAuthorMail($author, $updateAuthor = false) $context = $request->getContext(); // This should only ever happen within a context, never site-wide. - if ($context != null) { + if ($context != null && $context instanceof Journal) { $contextId = $context->getId(); $publicationId = $author->getData('publicationId'); $publication = Repo::publication()->get($publicationId);