From d43e34632477a20a2a483c05bf474e471f99ad37 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 4 Feb 2011 00:51:34 +0100 Subject: [PATCH] fixed __call() --- lib/Twig/Error.php | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Twig/Error.php b/lib/Twig/Error.php index 6604384..fad3957 100644 --- a/lib/Twig/Error.php +++ b/lib/Twig/Error.php @@ -93,17 +93,18 @@ class Twig_Error extends Exception /** * For PHP < 5.3.0, provides access to the getPrevious() method. * - * @param string $method The method name - * @param array $args The parameters to be passed to the method + * @param string $method The method name + * @param array $arguments The parameters to be passed to the method * * @return Exception The previous exception or null */ - public function __call($method, array $args) + public function __call($method, $arguments) { if ('getprevious' == strtolower($method)) { return $this->previous; } - return null; + + throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method)); } protected function updateRepr() -- 1.7.2.5