[BUGFIX] Avoid SQL error in indexed_search indexer on PostgreSQL 02/64902/3
authorStephan Großberndt <stephan.grossberndt@typo3.org>
Tue, 16 Jun 2020 17:17:00 +0000 (19:17 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 15 Jul 2020 09:47:06 +0000 (11:47 +0200)
This patch fixes the SQL query inserting index_rel records on PostgreSQL
by making sure an integer instead of a float is inserted in the freq
column (which is defined as smallint).

Resolves: #91660
Releases: master, 10.4, 9.5
Change-Id: Id994bce0ca89105f03446c5fe13516774b0a16a0

typo3/sysext/indexed_search/Classes/Indexer.php

index df7bb66..f8d5b30 100644 (file)
@@ -1952,7 +1952,7 @@ class Indexer
         } else {
             $newFreq = $freq / $mapFactor;
         }
-        return $newFreq;
+        return (int)$newFreq;
     }
 
     /********************************