I am getting this error when the search cache is set at anything more than zero. Verified on Garland theme.
Warning: array_slice() expects parameter 1 to be array, boolean given in /home/tplowe/public_html/gallery/zp-core/class-search.php on line 1515
Only seems to happen when the search returns a large number of hits. It does not happen when the search only returns 25 hits.
Comments
I did try this on a search that returned 182 images and it worked as expected.
Also look into the database "search_cache" table and see if it has a result for the search that fails. (I presume this search works if you are not caching the searches.)
Search with 528 hits - no error. Next Tag with more hits is 710 - error occurs consistently on all tags with more hits than 710 - no errors on tags with less then 528. I have no tags with occurrences between these two numbers to test.
I also checked the database. The searches are all cached. I did notice that if you turn search caching off, the cache is not deleted, so if you turn it back on you might be getting the old cache. I didn't check if it was deleted after the specified minutes had passed. I deleted the caches several times and generated new, but same results.
Also: On searches with over 710 occurrences you get the error below in the header if you click on any thumbnail displayed. After the search is cached no thumbnails are displayed, so this only happens prior to the cache being generated. (one time)
Also: The breadcrumbs displayed (occurs only on Garland) have an odd character in the path, when the error is triggered. The image requested is actually shown, but the error prints in the header. After the search is cached no thumbnails are displayed, so this only happens prior to the cache being generated. (one time)
Breadcrumb: » 2009 » Thacher » Thacher R&R.02.09.01
Tested on Default, Garland & zpArdoise. Default does not print the search error, it reports no images found (after the initial search is cached).
Warning: Invalid argument supplied for foreach() in /home/tplowe/public_html/gallery/zp-core/class-search.php on line 1530
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/zp-core/functions-common.php on line 482
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/zp-core/functions-common.php on line 482
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/index.php on line 103
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/index.php on line 104
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/index.php on line 105
Warning: Cannot modify header information - headers already sent by (output started at /home/tplowe/public_html/gallery/zp-core/class-search.php:1530) in /home/tplowe/public_html/gallery/index.php on line 106
Since it is still in the database, maybe you can copy it to a file and attach that to a GitHub issue.
BTW, there is no issue with having old data in the search cache. The age is checked when the data might be used and if it has expired it is discarded.