Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'hotfix-middleware-stack-order' into release-1.6.0

  • Loading branch information...
commit 9baf3014f6e5140d012926ee7d7a3176f1e0c314 2 parents 314e1c8 + 382c809
Josh Lockhart codeguy authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 Slim/Slim.php
10 Slim/Slim.php
View
@@ -156,12 +156,7 @@ public function __construct( $userSettings = array() ) {
$this->response = new Slim_Http_Response();
$this->router = new Slim_Router($this->request, $this->response);
$this->settings = array_merge(self::getDefaultSettings(), $userSettings);
-
- //Assign default middleware
$this->middleware = array($this);
- $this->add('Slim_Middleware_Flash');
- $this->add('Slim_Middleware_MethodOverride');
- $this->add('Slim_Middleware_PrettyExceptions');
//Determine application mode
$this->getMode();
@@ -1104,6 +1099,11 @@ public function add( $className, $settings = array() ) {
* @return void
*/
public function run() {
+ //Apply final outer middleware layers
+ $this->add('Slim_Middleware_Flash');
+ $this->add('Slim_Middleware_MethodOverride');
+ $this->add('Slim_Middleware_PrettyExceptions');
+
//Fetch status, header, and body
list($status, $header, $body) = $this->middleware[0]->call($this->environment);
Please sign in to comment.
Something went wrong with that request. Please try again.