We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efb7dc2 commit 83a793bCopy full SHA for 83a793b
interface/lib/classes/session.inc.php
@@ -56,7 +56,7 @@ function read ($session_id) {
56
57
if (is_array($rec)) {
58
$this->session_array = $rec;
59
- return $rec['session_data'];
+ return $this->session_array['session_data'];
60
} else {
61
return '';
62
}
@@ -68,6 +68,11 @@ function write ($session_id, $session_data) {
68
$this->session_array = array();
69
70
71
+ // Dont write session to DB if session data has not been changed after reading it.
72
+ if(isset($this->session_array['session_data']) && $this->session_array['session_data'] != '' && $this->session_array['session_data'] == $session_data) {
73
+ return true;
74
+ }
75
+
76
77
if ($this->session_array['session_id'] == '') {
78
$session_id = $this->db->quote($session_id);
0 commit comments