diff --git a/plugins/tasks/site_template.inc b/plugins/tasks/site_template.inc index d56a102..3b70644 100644 --- a/plugins/tasks/site_template.inc +++ b/plugins/tasks/site_template.inc @@ -93,7 +93,7 @@ function panels_everywhere_site_template_get_base_contexts($task, $subtask, $pla // We're already including the logged in user. We don't want that to // accidentally show up as the user being viewed if we're doing // something unrelated and the logged in user was added as a context. - if (isset($account->data->logged_in_user) || in_array('authenticated user', $account->data->roles)) { + if (isset($account->data->logged_in_user) || (isset($account->data->roles) && in_array('authenticated user', $account->data->roles))) { $account = ctools_context_create_empty('user'); }