Commit 7f2fd60e authored by Phill Sparks's avatar Phill Sparks

Fixed route before filter

and throw an Exception for anything falling through __call
parent 48f1879b
...@@ -95,7 +95,7 @@ class Route { ...@@ -95,7 +95,7 @@ class Route {
// request cycle makes tasks like authorization convenient. // request cycle makes tasks like authorization convenient.
$before = array_merge(array('before'), $this->filters('before')); $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; return $response;
} }
...@@ -209,6 +209,7 @@ class Route { ...@@ -209,6 +209,7 @@ class Route {
public function __call($method, $parameters) public function __call($method, $parameters)
{ {
if (strpos($method, 'is_') === 0) return $this->is(substr($method, 3)); 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment