Fatal error when amending an advanced search on a hid column
To reproduce on Chemistry's instance:
Go to a view with a hid column (eg Rooms/Room Occupants) and set up an advanced search for a value in the hid column (eg pick a particular research group). Run the search. Go to Action>Amedn Search. The search form stops being generated when the code reaches the hid column that had been given a value with the following:
Show in results
Exact match Exclude
( ! ) Fatal error: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /var/www/hotwire3/test/chemistry/classes/dbBase.php on line 833
( ! ) TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /var/www/hotwire3/test/chemistry/classes/dbBase.php on line 833
Call Stack
# Time Memory Function Location
1 0.0001 379808 {main}( ) .../edit.php:0
2 0.1335 675264 dbRecord->display( ) .../edit.php:45
3 0.1335 675264 dbRecord->displaySearch( ) .../dbRecord.php:115
4 0.1567 677552 dbColumn->displaySearchField( ) .../dbRecord.php:340
5 0.1568 677952 dbDispBase->displaySearchField( $ui = [0 => '<!-- Displaying a search of type int8 for responsible_group_id -->', 1 => '<!-- Class dbDispInt8 -->', 2 => NULL, 3 => '<div class="clearwidth int8" id="responsible__group__hid__row">', 4 => '<div class="search">', 5 => '<div class="searchkey"><p>Responsible group</p>', 6 => '<div class="suppress" id="hde__responsible__group__hid" >', 7 => '<input type="checkbox" value="off" name="hde_responsible_group_hid" id="hde__responsible__group__hid" />', 8 => '</div> <!-- suppress -->', 9 => '<div class="display" id="dsp__responsible__group__hid">Show in results <input type="checkbox" checked name="dsp_responsible_group_hid" id="dsp__responsible__group__hid" /></div>', 10 => '</div><!-- Searchkey -->', 11 => '<!-- Calling displaySearch -->'] ) .../dbColumn.php:400
6 0.1571 678768 dbDispBase->displaySearchValueStart( $ui = [0 => '<!-- Displaying a search of type int8 for responsible_group_id -->', 1 => '<!-- Class dbDispInt8 -->', 2 => NULL, 3 => '<div class="clearwidth int8" id="responsible__group__hid__row">', 4 => '<div class="search">', 5 => '<div class="searchkey"><p>Responsible group</p>', 6 => '<div class="suppress" id="hde__responsible__group__hid" >', 7 => '<input type="checkbox" value="off" name="hde_responsible_group_hid" id="hde__responsible__group__hid" />', 8 => '</div> <!-- suppress -->', 9 => '<div class="display" id="dsp__responsible__group__hid">Show in results <input type="checkbox" checked name="dsp_responsible_group_hid" id="dsp__responsible__group__hid" /></div>', 10 => '</div><!-- Searchkey -->', 11 => '<!-- Calling displaySearch -->'] ) .../dbDispBase.php:425
7 0.1571 678768 dbDispInt4->displaySearch( ) .../dbDispBase.php:403
8 0.1572 678984 dbDispInt4->getMMSelect( $search = TRUE ) .../dbDispInt4.php:79
9 0.1663 680288 dbBase->phpArray( $dbarr = [0 => '44'] ) .../dbDispInt4.php:130
The problem occurs on PHP 8.2 and PHP 8.3