Skip to content

Commit

Permalink
Fix error when $include is null when rendering (#16314)
Browse files Browse the repository at this point in the history
  • Loading branch information
fashxp committed Dec 6, 2023
1 parent 34eacaf commit d4b56a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Templating/Renderer/IncludeRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function render(mixed $include, array $params = [], bool $editmode = fals
});

// TODO is this enough for cache or should we disable caching completely?
if (method_exists($include, 'getUseTargetGroup') && $include->getUseTargetGroup()) {
if (is_object($include) && method_exists($include, 'getUseTargetGroup') && $include->getUseTargetGroup()) {
$cacheParams['target_group'] = $include->getUseTargetGroup();
}

Expand Down

0 comments on commit d4b56a4

Please sign in to comment.