From d4b56a4da4c723ad95638e27be63fdcb78c5bd63 Mon Sep 17 00:00:00 2001 From: Christian Fasching Date: Wed, 6 Dec 2023 10:14:28 +0100 Subject: [PATCH] Fix error when $include is null when rendering (#16314) --- lib/Templating/Renderer/IncludeRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Templating/Renderer/IncludeRenderer.php b/lib/Templating/Renderer/IncludeRenderer.php index 8eb556161fb..d6f11f86c19 100644 --- a/lib/Templating/Renderer/IncludeRenderer.php +++ b/lib/Templating/Renderer/IncludeRenderer.php @@ -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(); }