I'm using this excellent module to enable clients to add/edit nodes using the overlay. However, upon saving a newly created module I get this error message:
Fatal error: Unsupported operand types in C:\wamp\www\drupal\modules\overlay.module on line 238
/**
* Implements hook_drupal_goto_alter().
*
* If the current page request is inside the overlay, add ?render=overlay to
* the new path, so that it appears correctly inside the overlay.
*
* @see overlay_get_mode()
*/
function overlay_drupal_goto_alter(&$path, &$options, &$http_response_code) {
dsm($options);
if (overlay_get_mode() == 'child') {
if (isset($options['query'])) {
$options['query'] += array('render' => 'overlay'); <--- this is line 238
}
else {
$options['query'] = array('render' => 'overlay');
}
}
}
When I add a dsm($options) I get three arrays after the save (and after the error has been shown). The first one is empty, the next two look like this:
array('query' => '', 'fragment' => '')
i.e. to index keys but no values.
Now, if I change the operand type from "+=" to "="... the error message disappears, the empty array and ONE of the two arrays with an empty array.
I don't know what's wrong. Perhaps it's that $options is passed by reference... having a dsm($options) at the end of the function shows that it's the first and totally empty $options array instance that is set with render=>overlay.
Comments
Comment #1
casey commentedCannot reproduce