Skip to content

Commit ec2eda3

Browse files
committed
Fix session_set_save_handler error #365 introduced with #340
1 parent 033ad67 commit ec2eda3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ utils/starting_HEAD
88
# Composer
99
composer.lock
1010
/vendor/
11+
/.buildpath

Diff for: source/CAS/Client.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,10 @@ public function getChangeSessionID()
11131113
public function setSessionHandler(\SessionHandlerInterface $sessionHandler)
11141114
{
11151115
$this->_sessionHandler = $sessionHandler;
1116-
return session_set_save_handler($this->_sessionHandler, true);
1116+
if (session_status() !== PHP_SESSION_ACTIVE) {
1117+
return session_set_save_handler($this->_sessionHandler, true);
1118+
}
1119+
return true;
11171120
}
11181121

11191122
/**

0 commit comments

Comments
 (0)