Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Added some session error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Apr 24, 2016
1 parent 5ffdd12 commit 071234b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions includes/classes/Session.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ public function __isset($name)

public function save()
{
// do not save an empty session
$sessionId = session_id();
if(empty($sessionId)) {
return;
}

// sessions require an valid user.
if(empty($this->data['userId'])) {
$this->delete();
}

$userIpAddress = self::getClientIp();

$sql = 'REPLACE INTO %%SESSION%% SET
Expand Down

0 comments on commit 071234b

Please sign in to comment.