From e2a2866631d4719d7c00aac66494799ef54ed656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=B6ffler?= Date: Thu, 2 Nov 2017 14:29:04 +0100 Subject: [PATCH] Gets author only if given --- .../ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php b/html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php index 97713ceb..bb64f11d 100644 --- a/html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php +++ b/html/typo3conf/ext/ter_fe2/Classes/Solr/Indexqueue/TerIndexer.php @@ -125,7 +125,10 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer $document->setField('extensionDocumentationLink_stringS', $documentationLink); // get multiple authors - $authors = GeneralUtility::trimExplode(',', $extension->getLastVersion()->getAuthor()->getName()); + $authors = []; + if ($extension->getLastVersion() && $extension->getLastVersion()->getAuthor()) { + $authors = GeneralUtility::trimExplode(',', $extension->getLastVersion()->getAuthor()->getName()); + } $document->setField('author_textWstM', $authors); } -- GitLab