mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
Fixed guess template info for PHP 5.2
This commit is contained in:
+3
-1
@@ -161,6 +161,8 @@ class Twig_Error extends Exception
|
||||
if (null === $this->filename) {
|
||||
$this->filename = $template->getTemplateName();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +174,7 @@ class Twig_Error extends Exception
|
||||
$file = $r->getFileName();
|
||||
|
||||
$exceptions = array($e = $this);
|
||||
while (method_exists($e, 'getPrevious') && $e = $e->getPrevious()) {
|
||||
while (($e instanceof self || method_exists($e, 'getPrevious')) && $e = $e->getPrevious()) {
|
||||
$exceptions[] = $e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user