From 7f2fd60e9f3be441d61bb10ac3fa4b7c1ec5099f Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Sun, 16 Oct 2011 11:46:38 +0100 Subject: [PATCH] Fixed route before filter and throw an Exception for anything falling through __call --- laravel/routing/route.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/laravel/routing/route.php b/laravel/routing/route.php index e230d00e..7aa31cf3 100644 --- a/laravel/routing/route.php +++ b/laravel/routing/route.php @@ -95,7 +95,7 @@ public function call() // request cycle makes tasks like authorization convenient. $before = array_merge(array('before'), $this->filters('before')); - if ( ! is_null($response = $this->filter($before, array(), true))) + if ( ! is_null($response = Filter::run($before, array(), true))) { return $response; } @@ -117,7 +117,7 @@ public function call() Filter::run($filters, array($response)); - return $response; + return $response; } } @@ -209,6 +209,7 @@ public function handles($uri) public function __call($method, $parameters) { if (strpos($method, 'is_') === 0) return $this->is(substr($method, 3)); + throw new \Exception('Method "'.$method.'" not found', E_NOTICE); } } \ No newline at end of file