summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/drivers/Session_database_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-15 20:25:58 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-15 20:25:58 +0100
commitd0122559db3ca45523c7344c223bb28848fd3514 (patch)
tree04058689090ba91621a3baacb48800ebb3526768 /system/libraries/Session/drivers/Session_database_driver.php
parent7f8eb360e80449c81be425f06cef60666e32fe21 (diff)
feature/session (#3073): Fix an error from previous patch
Diffstat (limited to 'system/libraries/Session/drivers/Session_database_driver.php')
-rw-r--r--system/libraries/Session/drivers/Session_database_driver.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/system/libraries/Session/drivers/Session_database_driver.php b/system/libraries/Session/drivers/Session_database_driver.php
index 42ff96b7c..6c667b01f 100644
--- a/system/libraries/Session/drivers/Session_database_driver.php
+++ b/system/libraries/Session/drivers/Session_database_driver.php
@@ -145,12 +145,11 @@ class CI_Session_database_driver extends CI_Session_driver implements SessionHan
// PostgreSQL's variant of a BLOB datatype is Bytea, which is a
// PITA to work with, so we use base64-encoded data in a TEXT
// field instead.
- if ($this->_platform === 'postgre')
- {
- $result = base64_decode(rtrim($result->data));
- }
+ $result = ($this->_platform === 'postgre')
+ ? base64_decode(rtrim($result->data))
+ : $result->data;
- $this->_fingerprint = md5(rtrim($result));
+ $this->_fingerprint = md5($result);
$this->_row_exists = TRUE;
return $result->data;
}