From: Fabien Potencier Date: Thu, 3 Feb 2011 23:51:34 +0000 (+0100) Subject: fixed __call() X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d43e34632477a20a2a483c05bf474e471f99ad37;p=web%2Fkonrad%2Ftwig.git fixed __call() --- 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()