mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 20:16:45 +00:00
removed -2 magic number
This commit is contained in:
@@ -28,10 +28,7 @@ class LoaderError extends Error
|
||||
{
|
||||
public function __construct($message, $lineno = -1, $source = null, \Exception $previous = null)
|
||||
{
|
||||
\Exception::__construct('', 0, $previous);
|
||||
|
||||
$this->appendMessage($message);
|
||||
$this->setTemplateLine(-2);
|
||||
parent::__construct($message, $lineno, $source, $previous, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -221,8 +221,7 @@ abstract class Template implements \Twig_TemplateInterface
|
||||
|
||||
// this is mostly useful for \Twig\Error\LoaderError exceptions
|
||||
// see \Twig\Error\LoaderError
|
||||
if (-2 === $e->getTemplateLine()) {
|
||||
$e->setTemplateLine(-1);
|
||||
if (-1 === $e->getTemplateLine()) {
|
||||
$e->guess();
|
||||
}
|
||||
|
||||
@@ -424,8 +423,7 @@ abstract class Template implements \Twig_TemplateInterface
|
||||
|
||||
// this is mostly useful for \Twig\Error\LoaderError exceptions
|
||||
// see \Twig\Error\LoaderError
|
||||
if (-2 === $e->getTemplateLine()) {
|
||||
$e->setTemplateLine(-1);
|
||||
if (-1 === $e->getTemplateLine()) {
|
||||
$e->guess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user