Visit a node you know is in a group:
/node/123
Notice how it will redirect:
/SPACENAME/node/123

Now try to visit the node URL with a query parameter:
/node/123?destination=home or any other $_GET query.

and you will see a big Error, and in the watchdog: Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given

This patch fixes it. Tracked it down to space_type_purl->activate(); the $options['query'] must still be an array.

CommentFileSizeAuthor
space_type_purl.inc_.options.patch649 bytesjon pugh

Comments

arosboro’s picture

When I used ?destination=home the page loaded without issue (perhaps because home is not a valid alias on my site) I managed to reproduce your error with '/node/4?test=test':

The website encountered an unexpected error. Please try again later.
Error message
Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /home/og7/public_html/includes/common.inc on line 2161 and defined in drupal_http_build_query() (line 472 of /home/og7/public_html/includes/common.inc).

The error does not occur after patching.

original code: 'query' => drupal_http_build_query(drupal_get_query_parameters($_GET, array('q')))

It looks like drupal_http_build_query() was being called twice.

tobby’s picture

Status: Needs review » Reviewed & tested by the community

Excellent find, and thanks for the patch careernerd. I've tested that patch (I ran into the same issue today) and it worked for me, so I committed that at http://drupalcode.org/project/spaces.git/commit/689abc6

jon pugh’s picture

Status: Reviewed & tested by the community » Fixed

Setting to fixed, since it has been committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

readability fix