diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php
index 4fac8c4b795bffa5f153556a6e2b291027d46acb..22a6ab35352833012c7493dd4ba52ead5c21fcdb 100644
--- a/typo3/sysext/indexed_search/Classes/Indexer.php
+++ b/typo3/sysext/indexed_search/Classes/Indexer.php
@@ -268,7 +268,7 @@ class Indexer
         /** @var Lexer $lexer */
         $lexer = GeneralUtility::makeInstance($lexerObjectClassName);
         $this->lexerObj = $lexer;
-        $this->lexerObj->debug = $this->indexerConfig['debugMode'];
+        $this->lexerObj->debug = (bool)($this->indexerConfig['debugMode'] ?? false);
         // Initialize metaphone hook:
         // Make sure that the hook is loaded _after_ indexed_search as this may overwrite the hook depending on the configuration.
         if ($this->enableMetaphoneSearch && ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['metaphone'] ?? false)) {
@@ -1230,7 +1230,7 @@ class Indexer
             $connection->insert('index_fulltext', $fields);
         }
         // PROCESSING index_debug
-        if ($this->indexerConfig['debugMode']) {
+        if ($this->indexerConfig['debugMode'] ?? false) {
             $fields = [
                 'phash' => $this->hash['phash'],
                 'debuginfo' => json_encode([
@@ -1392,7 +1392,7 @@ class Indexer
             $connection->insert('index_fulltext', $fields);
         }
         // PROCESSING index_debug
-        if ($this->indexerConfig['debugMode']) {
+        if ($this->indexerConfig['debugMode'] ?? false) {
             $fields = [
                 'phash' => $hash['phash'],
                 'debuginfo' => json_encode([