Skip to content

Commit e51ef90

Browse files
committed
fix bug when other plugins execute "session_start"
1 parent e1956cb commit e51ef90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/StandAloneBounce.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class StandAloneBounce extends AbstractBounce implements IBounce
3131

3232
public function init(array $crowdSecStandaloneBouncerConfig)
3333
{
34-
session_start();
34+
if (\PHP_SESSION_NONE === session_status()) {
35+
session_start();
36+
}
3537
$this->settings = $crowdSecStandaloneBouncerConfig;
3638
$this->initLogger();
3739
}

0 commit comments

Comments
 (0)