Skip to content
Snippets Groups Projects
Commit 82433470 authored by Pedro Cambra's avatar Pedro Cambra Committed by Michael Stenta
Browse files

Issue #3306008 by pcambra: When not in entity context, template_preprocess_plan throws a warning

parent 66642dae
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ function plan_theme_suggestions_plan(array $variables) {
* - attributes: HTML attributes for the containing element.
*/
function template_preprocess_plan(array &$variables) {
$variables['plan'] = $variables['elements']['#plan'];
$variables['plan'] = $variables['elements']['#plan'] ?? NULL;
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment