diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php
index a0999d551d50d31deb06ead8b4171347e2c98824..a09d1084c8e00e1568fda500971f19371435e027 100644
--- a/typo3/sysext/backend/Classes/View/PageLayoutView.php
+++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php
@@ -3472,15 +3472,12 @@ class PageLayoutView implements LoggerAwareInterface
         $constraints = [];
         $currentPid = (int)$currentPid;
         $tablePidField = $table === 'pages' ? 'uid' : 'pid';
-        // Make query, only if table is valid and a search string is actually defined:
+        // Make query only if table is valid and a search string is actually defined
         if (empty($this->searchString)) {
             return '';
         }
 
         $searchableFields = $this->getSearchFields($table);
-        if (empty($searchableFields)) {
-            return '';
-        }
         if (MathUtility::canBeInterpretedAsInteger($this->searchString)) {
             $constraints[] = $expressionBuilder->eq('uid', (int)$this->searchString);
             foreach ($searchableFields as $fieldName) {
@@ -3510,7 +3507,7 @@ class PageLayoutView implements LoggerAwareInterface
                     );
                 }
             }
-        } else {
+        } elseif (!empty($searchableFields)) {
             $like = $queryBuilder->quote('%' . $queryBuilder->escapeLikeWildcards($this->searchString) . '%');
             foreach ($searchableFields as $fieldName) {
                 if (!isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) {
@@ -3551,7 +3548,7 @@ class PageLayoutView implements LoggerAwareInterface
                 }
             }
         }
-        // If no search field conditions have been build ensure no results are returned
+        // If no search field conditions have been built ensure no results are returned
         if (empty($constraints)) {
             return '0=1';
         }
diff --git a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
index ba24e0143262ed3d023bc76d5046c239645de9e0..08980b88bdf49ff9508218d8366cdfacdbbed2b6 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
@@ -904,15 +904,12 @@ class AbstractDatabaseRecordList extends AbstractRecordList
         $constraints = [];
         $currentPid = (int)$currentPid;
         $tablePidField = $table === 'pages' ? 'uid' : 'pid';
-        // Make query, only if table is valid and a search string is actually defined:
+        // Make query only if table is valid and a search string is actually defined
         if (empty($this->searchString)) {
             return '';
         }
 
         $searchableFields = $this->getSearchFields($table);
-        if (empty($searchableFields)) {
-            return '';
-        }
         if (MathUtility::canBeInterpretedAsInteger($this->searchString)) {
             $constraints[] = $expressionBuilder->eq('uid', (int)$this->searchString);
             foreach ($searchableFields as $fieldName) {
@@ -942,7 +939,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
                     );
                 }
             }
-        } else {
+        } elseif (!empty($searchableFields)) {
             $like = $queryBuilder->quote('%' . $queryBuilder->escapeLikeWildcards($this->searchString) . '%');
             foreach ($searchableFields as $fieldName) {
                 if (!isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) {
@@ -983,7 +980,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
                 }
             }
         }
-        // If no search field conditions have been build ensure no results are returned
+        // If no search field conditions have been built ensure no results are returned
         if (empty($constraints)) {
             return '0=1';
         }
diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
index a714577e090b945e5851c1b95628e4f03b7dde82..34ce004fc927c3d30429ab8b4d5174e9f64acab1 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
@@ -3353,15 +3353,12 @@ class DatabaseRecordList
         $constraints = [];
         $currentPid = (int)$currentPid;
         $tablePidField = $table === 'pages' ? 'uid' : 'pid';
-        // Make query, only if table is valid and a search string is actually defined:
+        // Make query only if table is valid and a search string is actually defined
         if (empty($this->searchString)) {
             return '';
         }
 
         $searchableFields = $this->getSearchFields($table);
-        if (empty($searchableFields)) {
-            return '';
-        }
         if (MathUtility::canBeInterpretedAsInteger($this->searchString)) {
             $constraints[] = $expressionBuilder->eq('uid', (int)$this->searchString);
             foreach ($searchableFields as $fieldName) {
@@ -3391,7 +3388,7 @@ class DatabaseRecordList
                     );
                 }
             }
-        } else {
+        } elseif (!empty($searchableFields)) {
             $like = $queryBuilder->quote('%' . $queryBuilder->escapeLikeWildcards($this->searchString) . '%');
             foreach ($searchableFields as $fieldName) {
                 if (!isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) {
@@ -3432,7 +3429,7 @@ class DatabaseRecordList
                 }
             }
         }
-        // If no search field conditions have been build ensure no results are returned
+        // If no search field conditions have been built ensure no results are returned
         if (empty($constraints)) {
             return '0=1';
         }