Skip to content

Commit

Permalink
Merge pull request #99 from laminas/2.22.x-merge-up-into-2.23.x_5RxNrSQB
Browse files Browse the repository at this point in the history
Merge release 2.22.1 into 2.23.x
  • Loading branch information
gsteel authored Dec 19, 2024
2 parents cbc2310 + 0c2b84c commit 9b0dc93
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 129 deletions.
11 changes: 10 additions & 1 deletion src/SessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

use function array_key_exists;
use function array_merge;
use function constant;
use function defined;
use function headers_sent;
use function is_array;
use function iterator_to_array;
Expand Down Expand Up @@ -91,12 +93,19 @@ public function sessionExists()
return true;
}

if ($this->getId()) {
/**
* @var string|false $sid
*/
$sid = defined('SID') ? constant('SID') : false;

if ($sid !== false && $this->getId()) {
return true;
}

if (headers_sent()) {
return true;
}

return false;
}

Expand Down
Loading

0 comments on commit 9b0dc93

Please sign in to comment.