Browse Source

Initializing default session if none is passed in the request

Jose Lorenzo Rodriguez 12 years ago
parent
commit
08e6436ff5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Network/Request.php

+ 5 - 1
src/Network/Request.php

@@ -206,8 +206,12 @@ class Request implements \ArrayAccess {
 			'base' => '',
 			'webroot' => '',
 			'input' => null,
-			'session' => null
 		);
+
+		if (empty($config['session'])) {
+			$config['session'] = new Session();
+		}
+
 		$this->_setConfig($config);
 	}