Project

General

Profile

« Previous | Next » 

Revision 1958

Added by darkviper almost 11 years ago

update Twig from version 1.13.1 to 1.13.2

View differences:

Error.php
186 186
    protected function guessTemplateInfo()
187 187
    {
188 188
        $template = null;
189
        $templateClass = null;
189 190

  
190 191
        if (version_compare(phpversion(), '5.3.6', '>=')) {
191 192
            $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
......
195 196

  
196 197
        foreach ($backtrace as $trace) {
197 198
            if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) {
198
                if (null === $this->filename || $this->filename == $trace['object']->getTemplateName()) {
199
                $currentClass = get_class($trace['object']);
200
                $isEmbedContainer = 0 === strpos($templateClass, $currentClass);
201
                if (null === $this->filename || ($this->filename == $trace['object']->getTemplateName() && !$isEmbedContainer)) {
199 202
                    $template = $trace['object'];
203
                    $templateClass = get_class($trace['object']);
200 204
                }
201 205
            }
202 206
        }

Also available in: Unified diff