modxcms/revolution — pull request #243 by eprochasson (2011-12-09 07:03:51+00:00)
Title: "Fix" toQueryString not handling nested array (using core PHP5 http_buil...

modX::toQueryString does not handle nested array properly. Say you pass:

Array(
'param' => Array (
'sortby' => 'sortorder'
,'sortdir' => 'ASC'
)
)

The query generated will be:
param=

When it is meant to be (without the encoding for readability):
param[sortby]=sortorder¶m[sortdir]=ASC

The php function http_build_query seems to do that perfectly and is available in PHP5. It might have been a choice to not use it in the first place (and not support this kind of query with modx), but this is a problem I encountered notably with getPage, which "loses" the search parameter for a pretty complicated form when moving to the next page.