mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
bug #3388 Fixed Twig\Template check (brandonkelly)
This PR was merged into the 2.x branch.
Discussion
----------
Fixed Twig\Template check
Looks like this was missed when the `Twig\Template` class was added, and `Twig_Template` was deprecated + aliased.
Commits
-------
67bff7b7 Fixed Twig\Template check
This commit is contained in:
+1
-1
@@ -198,7 +198,7 @@ class Error extends \Exception
|
||||
|
||||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
||||
foreach ($backtrace as $trace) {
|
||||
if (isset($trace['object']) && $trace['object'] instanceof Template && 'Twig_Template' !== \get_class($trace['object'])) {
|
||||
if (isset($trace['object']) && $trace['object'] instanceof Template && 'Twig\Template' !== \get_class($trace['object'])) {
|
||||
$currentClass = \get_class($trace['object']);
|
||||
$isEmbedContainer = 0 === strpos($templateClass, $currentClass);
|
||||
if (null === $this->name || ($this->name == $trace['object']->getTemplateName() && !$isEmbedContainer)) {
|
||||
|
||||
Reference in New Issue
Block a user