mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 20:16:45 +00:00
remove not needed code
This commit is contained in:
+1
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user