Skip to content

Commit 69975a9

Browse files
Bugfix indexing of gone files
prevent instantiating a file object when the file is deleted or missing
1 parent 419accd commit 69975a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

indexer/class.tx_mksearch_indexer_FAL.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,16 @@ protected function hasDocToBeDeleted(
217217
tx_mksearch_interface_IndexerDocument $indexDoc,
218218
$options = [],
219219
): bool {
220+
if (($sourceRecord['deleted'] ?? false) || ($sourceRecord['missing'] ?? false)) {
221+
return true;
222+
}
223+
220224
$filePath = $this->getFilePath($tableName, $sourceRecord);
221225
if (!TYPO3\CMS\Core\Utility\PathUtility::isAbsolutePath($filePath)) {
222226
$filePath = Sys25\RnBase\Utility\Environment::getPublicPath().$filePath;
223227
}
224228

225-
return ($sourceRecord['deleted'] ?? false) || ($sourceRecord['missing'] ?? false) || !file_exists($filePath.($sourceRecord['name'] ?? ''));
229+
return !file_exists($filePath.($sourceRecord['name'] ?? ''));
226230
}
227231

228232
/**

0 commit comments

Comments
 (0)