tbar0970 / jethro-pmm

Jethro Pastoral Ministry Manager
GNU General Public License v3.0
35 stars 25 forks source link

Jethro person report breaks if select-list custom field options aren't picked #1052

Closed jefft closed 3 months ago

jefft commented 3 months ago

Say we have a select-list custom field with 'Yes' and 'No' values. When creating a person report, we have these filter options:

image

What happens if we pick with value that contains but then don't actually pick any values?

image

I think this should be equivalent to 'not filled in'. What actually happens is that Jethro breaks:

image

PHP message: implode(): Invalid arguments passed - Line 1062 of /home/jethro/code/2.35.1/app/db_objects/person_query.class.phpPHP message: in_array() expects parameter 2 to be array, null given - Line 1064 of /home/jethro/code/2.35.1/app/db_objects/person_query.class.php', referer: https://jethro/?view=persons__reports&queryid=TEMP&configure=1
[Fri Jun 21 23:37:14.068754 2024] [proxy_fcgi:error] [pid 17347:tid 135592465569344] [remote 127.0.0.1:42172] AH01071: Got error 'PHP message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')))))\n\t\t\t\t\nGROUP BY p.id\nORDER BY `p`.`last_name`, p.last_name, p.familyid, a...' at line 9 - Line 171 of /home/jethro/code/2.35.1/app/include/jethrodb.php', referer: https://jethro/?view=persons__reports&queryid=TEMP&configure=1