session native, fix cookie settings

Signed-off-by: GDmac <grdalenoort@gmail.com>
diff --git a/system/libraries/Session/drivers/Session_native.php b/system/libraries/Session/drivers/Session_native.php
index fb3b638..da744f3 100755
--- a/system/libraries/Session/drivers/Session_native.php
+++ b/system/libraries/Session/drivers/Session_native.php
@@ -84,8 +84,8 @@
 		$expire = 7200;
 		$path = '/';
 		$domain = '';
-		$secure = FALSE;
-		$http_only = FALSE;
+		$secure = (bool) $config['cookie_secure'];
+		$http_only = (bool) $config['cookie_httponly'];
 
 		if ($config['sess_expiration'] !== FALSE)
 		{
@@ -105,18 +105,6 @@
 			$domain = $config['cookie_domain'];
 		}
 
-		if ($config['cookie_secure'])
-		{
-			// Send over SSL / HTTPS only?
-			$secure = $config['cookie_secure'];
-		}
-
-		if ($config['cookie_httponly'])
-		{
-			// only available to HTTP(S)?
-			$http_only = $config['http_only'];
-		}
-
 		session_set_cookie_params($config['sess_expire_on_close'] ? 0 : $expire, $path, $domain, $secure, $http_only);
 
 		// Start session