gregstoll / gallery2

A fork of the Gallery project (galleryproject.org) that supports PHP 8
GNU General Public License v2.0
44 stars 24 forks source link

"Array to string" deprecated error on search form #139

Closed miceno closed 1 year ago

miceno commented 1 year ago

When searching for some results, an array to string conversion error rises on GalleryUrlGenerator.class on the search result form.

The reason is due to the way the cached urls are generated. As of now the query params are rebuilt manually concatenating the results of parse_str. As some of the values might be of array type (for example g2_form[], etc), the conversion fails.

Using a more robust query builder will be better, for example http_build_query.