diff options
Diffstat (limited to 'inc/lib/Twig/Error/Loader.php')
| -rw-r--r-- | inc/lib/Twig/Error/Loader.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/inc/lib/Twig/Error/Loader.php b/inc/lib/Twig/Error/Loader.php index 68efb574..df566dd7 100644 --- a/inc/lib/Twig/Error/Loader.php +++ b/inc/lib/Twig/Error/Loader.php @@ -3,7 +3,7 @@ /* * This file is part of Twig. * - * (c) 2010 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -24,8 +24,17 @@ */ class Twig_Error_Loader extends Twig_Error { - public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null) + public function __construct($message, $lineno = -1, $source = null, Exception $previous = null) { - parent::__construct($message, false, false, $previous); + if (PHP_VERSION_ID < 50300) { + $this->previous = $previous; + Exception::__construct(''); + } else { + Exception::__construct('', 0, $previous); + } + $this->appendMessage($message); + $this->setTemplateLine(false); } } + +class_alias('Twig_Error_Loader', 'Twig\Error\LoaderError', false); |
