[TikiWiki-commits] [Git][tikiwiki/tiki][29.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 <69789586a1a01_3b183d28637ee@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f545cf475-n8c2m.mail>

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


Commits:
e4b31d70 by Victor Emanouilov at 2026-01-27T12:37:53+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/e4b31d7004db315b94f365032ea59fd5a711ed17

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e4b31d7004db315b94f365032ea59fd5a711ed17
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.