Hi,
Problem on my Piwigo installation, also on https://demo1.piwigo.com
To reproduce:
Search > Search for words:
1. Search for all terms
2. Search in:
2.1 Deselect everything except leave selected: Album description
3. Search for any string longer than 1 char, for example "aa", you will get an error. If you search for single char "a": no error.
Error text:
Fatal error: Uncaught mysqli_sql_exception: 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 'AND (category_id NOT IN (5,19,20,21,28,48,49,50,63,72,73,82,89,102,122,128,13...' at line 8 in /var/www/piwigo_master_15/include/dblayer/functions_mysqli.inc.php:132 Stack trace: #0 /var/www/piwigo_master_15/include/dblayer/functions_mysqli.inc.php(132): mysqli->query() #1 /var/www/piwigo_master_15/include/dblayer/functions_mysqli.inc.php(888): pwg_query() #2 /var/www/piwigo_master_15/include/functions_search.inc.php(262): query2array() #3 /var/www/piwigo_master_15/include/functions_search.inc.php(2022): get_regular_search_results() #4 /var/www/piwigo_master_15/include/section_init.inc.php(364): get_search_results() #5 /var/www/piwigo_master_15/index.php(12): include('...') #6 {main} thrown in /var/www/piwigo_master_15/include/dblayer/functions_mysqli.inc.php on line 132
Piwigo 15.5
Piwigo URL: https://demo1.piwigo.com/index?/search/ … nVdVt5wTpR
Offline
correction"
Search for any string with dot in it for example "a.a", you will get an error. If you search for single char "a": no error.
Offline