summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2019-06-23 00:48:50 +0200
committerGeorge Petculescu <gxgpet@gmail.com>2019-06-23 00:48:50 +0200
commit4912ef2d1c44e1b314dcfcc932674d517f0999b0 (patch)
treeeeac2edf7b2aee69fa1bfd126d9fd78a5495e70c /system/libraries
parente0bdd367067a8231a4c2a8c9589c2e286b6fde6f (diff)
Session files driver to return failure status code (+logging) instead of Exception throwing
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Session/drivers/Session_files_driver.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php
index 467059434..2899b7dec 100644
--- a/system/libraries/Session/drivers/Session_files_driver.php
+++ b/system/libraries/Session/drivers/Session_files_driver.php
@@ -135,12 +135,14 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle
{
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.");
+ log_message('error', "Session: Configured save path '".$this->_config['save_path']."' is not a directory, doesn't exist or cannot be created.");
+ return $this->_failure;
}
}
elseif ( ! is_writable($save_path))
{
- throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process.");
+ log_message('error', "Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process.");
+ return $this->_failure;
}
$this->_config['save_path'] = $save_path;