From 001c8ec301ab85d74232d7b250808fcae0e19cad Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 19 Dec 2013 09:52:11 -0800 Subject: [PATCH] Fixed error with calling stop method. --- flight/Engine.php | 4 +++- flight/core/Dispatcher.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flight/Engine.php b/flight/Engine.php index f837215..72bead8 100644 --- a/flight/Engine.php +++ b/flight/Engine.php @@ -292,7 +292,9 @@ class Engine { } // Allow post-filters to run - $this->after('start', array($this, 'stop')); + $this->after('start', function() { + $this->stop(); + }); // Route the request while ($route = $this->router()->route($this->request())) { diff --git a/flight/core/Dispatcher.php b/flight/core/Dispatcher.php index c5aab29..ea732e2 100644 --- a/flight/core/Dispatcher.php +++ b/flight/core/Dispatcher.php @@ -134,6 +134,7 @@ class Dispatcher { * @param callback $callback Callback function * @param array $params Function parameters * @return mixed Function results + * @throws \Exception */ public static function execute($callback, array &$params = array()) { if (is_callable($callback)) {