mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
quick fix equal-int comparison resulting in an error if search string is numeric but out of range of integer column
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
/*
|
||||
* TODO: 2025-07-21 ma0080 bare integer comparision results in db error
|
||||
* if searchstring is numeric but out of range of int, think about
|
||||
* more sophisticated solution using column data type - quick fix
|
||||
* convert field and search string to text
|
||||
*/
|
||||
$config['equal-int'] = [
|
||||
'priority' => 4,
|
||||
'rank' => "0",
|
||||
'compare' => "{field} = {word}",
|
||||
'compare' => "{field}::text = {word}::text",
|
||||
'force_integer' => true
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user