I'm currently running into an issue were a user receives the following fatal error if they do not have the permission to create the "Event" content type the calendar is generated from. The pages are displayed using the view templates provided and the "Add Event" link is enabled.

Unsupported operand types in public_html/sites/all/modules/calendar/calendar.module on line 172

The line in question is from the calendar_menu_local_tasks_alter() function:

// The add new content page would redirect to the new event
// if we did not override that here. This way they will
// redirect back to the calendar.
$item['localized_options'] += array('query' => array());

Let me know if there's anything else I can provide to help locate what could be causing this.

Comments

I had the same problem, solved it by adding:

if(!isset($item['localized_options']))
{
    $item['localized_options'] = array();
}

before line 172

I had the same issue, and the solution proposed by Jaws worked for me.

the posted solution works for me, too

Thanks Jaws! I made a patch file for the added lines.

Status:Active» Reviewed & tested by the community

I also change the status of the issue to RTBC.