[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Manticore cast to double when doing range search on numeric values

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6978959518da9_3b183b84509fb@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f545cf475-jgcvj.mail>

Victor Emanouilov pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
a13720ab by Victor Emanouilov at 2026-01-27T12:38:07+02:00
[FIX] Manticore cast to double when doing range search on numeric values

- - - - -


1 changed file:

- lib/core/Search/Manticore/QueryBuilder.php


Changes:

=====================================
lib/core/Search/Manticore/QueryBuilder.php
=====================================
@@ -237,12 +237,18 @@ class QueryBuilder
             if ($raw === "" || is_null($raw)) {
                 $to = $this->getQuoted($node->getToken('to'));
                 $key = 'tf_' . uniqid();
+                if (is_numeric($to)) {
+                    $field = 'double(' . $field . ')';
+                }
                 $this->select[$key] = "$field <= $to";
                 return "$key = 1";
             } else {
                 $from = $this->getQuoted($node->getToken('from'));
                 $to = $this->getQuoted($node->getToken('to'));
                 $key = 'tf_' . uniqid();
+                if (is_numeric($from) && is_numeric($to)) {
+                    $field = 'double(' . $field . ')';
+                }
                 $this->select[$key] = "($field >= $from AND $field <= $to)";
                 return "$key = 1";
             }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a13720ab361349a9eb551e39eb60a030de0aa615

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a13720ab361349a9eb551e39eb60a030de0aa615
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.