mirror of
https://github.com/jimeh/php-rack.git
synced 2026-02-19 11:56:38 +00:00
fixed an issue with Rack::init()
This commit is contained in:
@@ -39,9 +39,11 @@ class Rack {
|
|||||||
|
|
||||||
public static function init ($middleware = array()) {
|
public static function init ($middleware = array()) {
|
||||||
|
|
||||||
// quick initialization
|
// easy initialization
|
||||||
if ( !empty($middleware) && is_array($middleware) ) {
|
if ( !empty($middleware) && is_array($middleware) ) {
|
||||||
self::$middleware = array_merge(self::$middleware, $middleware);
|
$ware = array();
|
||||||
|
foreach( $middleware as $key => $value ) $ware[$value] = true;
|
||||||
|
self::$middleware = array_merge(self::$middleware, $ware);
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't output anything before Rack has output it's headers
|
// don't output anything before Rack has output it's headers
|
||||||
|
|||||||
Reference in New Issue
Block a user