remove not needed code

This commit is contained in:
Christian Flothmann
2025-02-27 09:41:30 +01:00
parent 4e1fa3aa43
commit 53facb74c1
+1 -5
View File
@@ -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;
}