Browse Source

Ignore the fact that the session already exists when inserting the session in the php_session table. References BT#3023 #replication #cluster

Yannick Warnier 13 years ago
parent
commit
784759e8aa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/inc/lib/session_handler.class.php

+ 1 - 1
main/inc/lib/session_handler.class.php

@@ -108,7 +108,7 @@ class session_handler {
 
 		if ($this->sqlConnect()) {
 
-			$result = $this->sqlQuery("INSERT INTO ".$this->connection['base'].".php_session(session_id,session_name,session_time,session_start,session_value) VALUES('$sess_id','".$this->session_name."','$time','$time','".addslashes($sess_value)."')", false);
+			$result = $this->sqlQuery("INSERT IGNORE INTO ".$this->connection['base'].".php_session(session_id,session_name,session_time,session_start,session_value) VALUES('$sess_id','".$this->session_name."','$time','$time','".addslashes($sess_value)."')", false);
 
 			if (!$result) {
 				$this->sqlQuery("UPDATE ".$this->connection['base'].".php_session SET session_name='".$this->session_name."',session_time='$time',session_value='".addslashes($sess_value)."' WHERE session_id='$sess_id'");