diff --git a/typo3/sysext/indexed_search/Classes/FileContentParser.php b/typo3/sysext/indexed_search/Classes/FileContentParser.php
index 4162f14c5c49220423f345ca1ef5b6571dc236b8..74513f1d4238d816ab65b09577bfd4b7321033bc 100644
--- a/typo3/sysext/indexed_search/Classes/FileContentParser.php
+++ b/typo3/sysext/indexed_search/Classes/FileContentParser.php
@@ -477,7 +477,7 @@ class FileContentParser
                     CommandUtility::exec($cmd, $res);
                     $pdfInfo = $this->splitPdfInfo($res);
                     unset($res);
-                    if ((int)$pdfInfo['pages']) {
+                    if ((int)($pdfInfo['pages'] ?? 0)) {
                         [$low, $high] = explode('-', $cPKey);
                         // Get pdf content:
                         $tempFileName = GeneralUtility::tempnam('Typo3_indexer');