I'm having a strange issue with search results while logged in as an administrator. Both Quick Search and Search seem to work fine, and return the proper results. If I click on a result thumbnail from Quick Search, everything is fine. But if I click on a result thumbnail from Search, sometimes I get this error:
Notice: Undefined offset: 6 in /usr/local/piwigo/picture.php on line 241 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 (41701,41702,41702,28663,) ; in /usr/local/piwigo/include/dblayer/functions_mysqli.inc.php on line 845 Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in /usr/local/piwigo/include/dblayer/functions_mysqli.inc.php:226 Stack trace: #0 /usr/local/piwigo/picture.php(495): pwg_db_fetch_assoc(false) #1 {main} thrown in /usr/local/piwigo/include/dblayer/functions_mysqli.inc.php on line 226
Looks like the IN list has a trailing comma? This doesn't happen with every search, but does only seem to happen when I'm logged into Piwigo. If I log out and do the same Search, clicking on the result thumbnail properly shows the photo.
I've tried switching themes, disabling some extensions, but can't figure out what is causing this.
Piwigo version: 2.8.6
PHP version: 7.0.13-0ubuntu0.16.10.1
MySQL version: 5.7.17-0ubuntu0.16.10.1
Piwigo URL: http://www.windracer.net/photos
Offline
Any ideas? I can't figure this one out ...
Offline
I'm still encountering this problem occasionally on 2.9.1 ... no idea what's causing it.
Offline