summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Session/drivers/Session_files_driver.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php
index 04562b282..32aeab614 100644
--- a/system/libraries/Session/drivers/Session_files_driver.php
+++ b/system/libraries/Session/drivers/Session_files_driver.php
@@ -1,4 +1,4 @@
-<?php
+r<?php
/**
* CodeIgniter
*
@@ -112,10 +112,16 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
*/
public function open($save_path, $name)
{
- if ( ! is_dir($save_path) && ! mkdir($save_path, 0700, TRUE))
+ if ( ! is_dir($save_path))
{
- log_message('error', "Session: Configured save path '".$this->_config['save_path']."' is not a directory, doesn't exist or cannot be created.");
- return FALSE;
+ if ( ! mkdir($save_path, 0700, TRUE))
+ {
+ throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not a directory, doesn't exist or cannot be created.");
+ }
+ }
+ elseif ( ! is_writable($save_path))
+ {
+ throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process.");
}
$this->_config['save_path'] = $save_path;