Fixed : WPCrm bootSessionIfNeeded trying to access $_SESSION['wpcrm'] before session was started
This commit is contained in:
parent
3ac734dbae
commit
7e6efc7d4e
2 changed files with 4 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
### All notable changes to `CRM CLient V2` will be documented in this file.
|
||||
# version 3.0.1
|
||||
- Fixed : WPCrm bootSessionIfNeeded trying to access $_SESSION['wpcrm'] before session was started
|
||||
- Fixed : WPCrm now only returns a boolean
|
||||
- Fixed : get crm info when client used in laravel
|
||||
- Changed : WpCrm::makeApiV2Call Change LogLevel on error from Emerge to Critical
|
||||
|
|
|
|||
|
|
@ -465,12 +465,12 @@ class WPCrm
|
|||
self::$sessionKey = ($_SERVER['HTTP_USER_AGENT'] ?? '') . ($_SERVER['REMOTE_ADDR'] ?? '');
|
||||
/** @var string self::$sessionKey */
|
||||
self::$sessionKey = \strlen(self::$sessionKey) ? self::$sessionKey : (date('d') ? date('d') : '');
|
||||
if (!isset($_SESSION['wpcrm'])) {
|
||||
$_SESSION['wpcrm'] = [];
|
||||
}
|
||||
if (!session_id() && !self::$sessionDestroyed) {
|
||||
session_start();
|
||||
}
|
||||
if (!isset($_SESSION['wpcrm'])) {
|
||||
$_SESSION['wpcrm'] = [];
|
||||
}
|
||||
if (
|
||||
// If session identity is violated.
|
||||
count($_SESSION['wpcrm']) > 1 or
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue