mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-29 19:47:06 +00:00
Avoid errors when failing to guess the template info for an error
This commit is contained in:
committed by
GitHub
parent
8832f6327c
commit
62747cee27
@@ -148,6 +148,10 @@ class Error extends \Exception
|
||||
}
|
||||
}
|
||||
|
||||
if (null === $template) {
|
||||
return; // Impossible to guess the info as the template was not found in the backtrace
|
||||
}
|
||||
|
||||
$r = new \ReflectionObject($template);
|
||||
$file = $r->getFileName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user