Enabling the “Debug” reaction in a context has caused me to get this error:

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /Users/mikl/Sites/commerce/includes/common.inc on line 2134 and defined in drupal_http_build_query() (line 469 of /Users/mikl/Sites/commerce/includes/common.inc).

This is caused by the url() function being called with the query option set to a string like `destination=front_grid`. The query option is allowed to be either a string or an array in Drupal 6, but no longer in Drupal 7, so the correct way to call it would be something like this:

$myurl = url('<front>', array(
  'query' => array(
    'destination' => 'front_grid'
  ),
);

More array mashery, yes…

Comments

yhahn’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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