From 53facb74c19d98d06d70dd69283ba5a5466ffbaf Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 27 Feb 2025 09:41:30 +0100 Subject: [PATCH] remove not needed code --- src/Error/Error.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Error/Error.php b/src/Error/Error.php index d0d2ea36b..13e8eefad 100644 --- a/src/Error/Error.php +++ b/src/Error/Error.php @@ -139,15 +139,11 @@ class Error extends \Exception $this->lineno = 0; $template = null; - $templateClass = null; $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS | \DEBUG_BACKTRACE_PROVIDE_OBJECT); foreach ($backtrace as $trace) { if (isset($trace['object']) && $trace['object'] instanceof Template) { - $currentClass = \get_class($trace['object']); - $isEmbedContainer = null === $templateClass ? false : str_starts_with($templateClass, $currentClass); - if ($this->source->getName() === $trace['object']->getTemplateName() && !$isEmbedContainer) { + if ($this->source->getName() === $trace['object']->getTemplateName()) { $template = $trace['object']; - $templateClass = \get_class($trace['object']); break; }