Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 5d47dd9

Browse files
committed
:octocat:
1 parent 00788d4 commit 5d47dd9

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Storage/SessionStorage.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public function __construct(SettingsContainerInterface $options = null){
4343
$this->sessionVar = $this->options->sessionTokenVar;
4444
$this->stateVar = $this->options->sessionStateVar;
4545

46-
if($this->options->sessionStart && !$this->sessionIsActive()){
46+
// Determine if the session has started.
47+
// @link http://stackoverflow.com/a/18542272/1470961
48+
if($this->options->sessionStart && !(session_status() !== PHP_SESSION_NONE)){
4749
session_start();
4850
}
4951

@@ -204,14 +206,4 @@ public function clearAllCSRFStates():OAuthStorageInterface{
204206
return $this;
205207
}
206208

207-
/**
208-
* Determine if the session has started.
209-
* @url http://stackoverflow.com/a/18542272/1470961
210-
*
211-
* @return bool
212-
*/
213-
public function sessionIsActive():bool{
214-
return session_status() !== PHP_SESSION_NONE;
215-
}
216-
217209
}

0 commit comments

Comments
 (0)