In the regular search page (search.php), if you "search for words" and check the "tags" box : if your search matches a tag, then on the photo page you get something like:
Notice: Undefined offset: 25 in picture.php on line 244
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
SELECT *
FROM images
WHERE id IN (1351,1255,)
; in include/dblayer/functions_mysqli.inc.php on line 845
In the regular search page (search.php), if you "search for words" and check the "tags" box : if your search matches a tag, then on the photo page you get something like:
```
Notice: Undefined offset: 25 in picture.php on line 244
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
SELECT *
FROM images
WHERE id IN (1351,1255,)
; in include/dblayer/functions_mysqli.inc.php on line 845
```
<!-- github-sync-id:245457851 -->
The problem lies in the list of items returned by get_regular_search_results function : if the search in tags matches some photos which are already found on other photo properties, then the "array_unique" will not reset the numeric keys in the $page['items']. We need to reset the keys.
That's the quick fix. But there is also another issue: the sorting order, when a merge is applied in the results, is not compliant with $conf['order_by']. This should be fixed in the future.
The problem lies in the list of items returned by get_regular_search_results function : if the search in tags matches some photos which are already found on other photo properties, then the "array_unique" will not reset the numeric keys in the $page['items']. We need to reset the keys.
That's the quick fix. But there is also another issue: the sorting order, when a merge is applied in the results, is not compliant with $conf['order_by']. This should be fixed in the future.
<!-- github-comment-id:317792364 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In the regular search page (search.php), if you "search for words" and check the "tags" box : if your search matches a tag, then on the photo page you get something like:
The problem lies in the list of items returned by get_regular_search_results function : if the search in tags matches some photos which are already found on other photo properties, then the "array_unique" will not reset the numeric keys in the $page['items']. We need to reset the keys.
That's the quick fix. But there is also another issue: the sorting order, when a merge is applied in the results, is not compliant with $conf['order_by']. This should be fixed in the future.