Fatal error: Unsupported operand types in common.inc on line 2287 when registering new user I am receiving this error message when registering as a new user on a site-in-progress: 


  Fatal error: Unsupported operand types in common.inc on line 2287


The actual line 2287 is:


  $query += $options['query'];


Here is the surrounding code:

// Without Clean URLs.
  else {
    $path = $prefix . $path;
    $query = array();
if (!empty($path)) {
  $query['q'] = $path;
}
if ($options['query']) {
  // We do not use array_merge() here to prevent overriding $path via query
  // parameters.
  $query += $options['query'];
}
$query = $query ? ('?' . drupal_http_build_query($query)) : '';
$script = isset($options['script']) ? $options['script'] : '';
return $base . $script . $query . $options['fragment'];
  }
}


I use LoginToboggan, not sure if that has anything to do with this issue. Does anyone have any ideas on what might cause this issue and how it can be fixed?

Thanks!
The problem is in the url() function and is because either the l() or url() functions are being called with a 'query' that is not an array.

Those functions expect the 'query' option to be an array and it is likely that something is passing a string into them.

Do you have any custom code in modules or themes that is calling l() or url()?

I see you have already seen the issue at http://drupal.org/node/1275048

To debug the problem, add this code to the line before the error line:

if (!is_array($options['query'])) {
  die(print_r(func_get_args()));
}


Then reload the page with the error and you will get a bunch of text on a white screen.
Post that text back here and/or that drupal.org issue.

After your latest information
There is a bug in logintoboggan that makes this break whenever you have a redirect url with a query string in it (that is the part with ?key1=value1&amp;key2=value2).

I have made a patch to fix it in the issue mentioned above.