From 7a54542a548c9bead57f32f913fd4dd5a5c8c148 Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Fri, 26 Apr 2024 15:40:41 +0200 Subject: [PATCH] prevent processing twice a file with empty body --- modules/entity_to_text_tika/src/Commands/OcrWarmupCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/entity_to_text_tika/src/Commands/OcrWarmupCommand.php b/modules/entity_to_text_tika/src/Commands/OcrWarmupCommand.php index 2f96a1a..6571f0d 100644 --- a/modules/entity_to_text_tika/src/Commands/OcrWarmupCommand.php +++ b/modules/entity_to_text_tika/src/Commands/OcrWarmupCommand.php @@ -169,7 +169,7 @@ public function warmup( // Load the already OCR'ed file if possible. $body = $this->localFileStorage->load($file, 'eng+fra'); - if (!$body || $force) { + if ($body === NULL || $force) { // When the OCR'ed file is not available, then run Tika over it // and store it for the next run. $body = $this->fileToText->fromFileToText($file, 'eng+fra');