summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2019-06-23 05:12:54 +0200
committerGitHub <noreply@github.com>2019-06-23 05:12:54 +0200
commit66b1bf6145537b02e7386e783ffd60112f33baf6 (patch)
treeeeac2edf7b2aee69fa1bfd126d9fd78a5495e70c
parent255907cd5e5c8bd34fb6e0e57343084b6225d002 (diff)
parent4912ef2d1c44e1b314dcfcc932674d517f0999b0 (diff)
[ci skip] Merge pull request #5783 from gxgpet/develop
Session files driver to return the failure status code instead of Exception throwing
-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;