diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-08-19 19:09:51 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-08-19 19:09:51 +0300 |
commit | 1731d4c438e3ba893f322a3c65b726d6d9d8994d (patch) | |
tree | 9d08441d5981d99715aa031a2eeb519abc3413be /lib | |
parent | ba93f948b703c395be85dcaf498216b2a65b29ad (diff) |
reset error before generating content
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/IndexService.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Service/IndexService.php b/lib/Service/IndexService.php index 00e8d9c..2c069e3 100644 --- a/lib/Service/IndexService.php +++ b/lib/Service/IndexService.php @@ -213,6 +213,7 @@ class IndexService { $index->setStatus(Index::INDEX_FULL); } + $index->resetErrors(); $document->setIndex($index); if ($options->getOption('force', false) === true || !$this->isDocumentUpToDate($provider, $document)) { @@ -348,6 +349,7 @@ class IndexService { $index = $document->getIndex(); $access = $document->getAccess(); +// INDEX_IGNORE is not used anymore, as we use addError() if ($access !== null && !$index->isStatus(Index::INDEX_IGNORE)) { $index->setOwnerId($access->getOwnerId()); $toIndex[] = $document; @@ -379,8 +381,6 @@ class IndexService { ); $index = null; - $document->getIndex() - ->resetErrors(); try { $index = $platform->indexDocument($provider, $document); } catch (Exception $e) { |