-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3315 from Icinga/bugfix/php-7-2-support-3185
Don't call session_start() after ini_set()
- Loading branch information
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/* Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ */ | ||
|
||
namespace Icinga\Web\Session; | ||
|
||
use Icinga\Application\Logger; | ||
use Icinga\Exception\ConfigurationError; | ||
use Icinga\Web\Cookie; | ||
|
||
/** | ||
* Session implementation in PHP | ||
*/ | ||
class Php72Session extends PhpSession | ||
{ | ||
/** | ||
* Open a PHP session | ||
*/ | ||
protected function open() | ||
{ | ||
session_name($this->sessionName); | ||
|
||
$cookie = new Cookie('bogus'); | ||
session_set_cookie_params( | ||
0, | ||
$cookie->getPath(), | ||
$cookie->getDomain(), | ||
$cookie->isSecure(), | ||
true | ||
); | ||
|
||
session_start(array( | ||
'use_cookies' => true, | ||
'use_only_cookies' => true, | ||
'use_trans_sid' => false | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters