Fix for PHP Notice: session_start(): A session had already been started (#1063)
Fix for PHP Notice: session_start(): A session had already been started - ignoring in var/www/html/baikal/Core/Frameworks/Flake/Framework.php on line 187
This commit is contained in:
parent
59f2fcd960
commit
5f59a70f02
1 changed files with 3 additions and 1 deletions
|
@ -184,7 +184,9 @@ class Framework extends \Flake\Core\Framework {
|
|||
|
||||
if (!\Flake\Util\Tools::isCliPhp()) {
|
||||
ini_set("html_errors", true);
|
||||
session_start();
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
if (!isset($_SESSION['CSRF_TOKEN'])) {
|
||||
$_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(20));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue