[BUGFIX] The raw search must check if field exists 12/34512/2
authorGeorg Ringer <georg.ringer@gmail.com>
Sun, 23 Nov 2014 21:10:22 +0000 (22:10 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 23 Nov 2014 21:16:34 +0000 (22:16 +0100)
The "raw search in all fields" must check if a field
exists in the table before building up the query.

Resolves: #63273
Releases: master, 6.2
Change-Id: I115ea3fb973c500308bb6a9f6799e9a3af65edcc
Reviewed-on: http://review.typo3.org/34512
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Database/QueryView.php

index 7c8df1e..7eeeaea 100644 (file)
@@ -490,7 +490,8 @@ class QueryView {
                                if (empty($conf['columns'])) {
                                        continue;
                                }
-                               $list = array_keys($conf['columns']);
+                               $fieldsInDatabase = $GLOBALS['TYPO3_DB']->admin_get_fields($table);
+                               $list = array_intersect(array_keys($conf['columns']), array_keys($fieldsInDatabase));
                                // Get query
                                $qp = $GLOBALS['TYPO3_DB']->searchQuery(array($swords), $list, $table);
                                // Count: