mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°5809 Update apereo/phpcas from 1.6.0 to 1.6.1
This commit is contained in:
@@ -973,11 +973,6 @@ class CAS_Client
|
||||
session_start();
|
||||
phpCAS :: trace("Starting a new session " . session_id());
|
||||
}
|
||||
// init phpCAS session array
|
||||
if (!isset($_SESSION[static::PHPCAS_SESSION_PREFIX])
|
||||
|| !is_array($_SESSION[static::PHPCAS_SESSION_PREFIX])) {
|
||||
$_SESSION[static::PHPCAS_SESSION_PREFIX] = array();
|
||||
}
|
||||
}
|
||||
|
||||
// Only for debug purposes
|
||||
@@ -1198,9 +1193,21 @@ class CAS_Client
|
||||
{
|
||||
$this->validateSession($key);
|
||||
|
||||
$this->ensureSessionArray();
|
||||
$_SESSION[static::PHPCAS_SESSION_PREFIX][$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the session array is initialized before writing to it.
|
||||
*/
|
||||
protected function ensureSessionArray() {
|
||||
// init phpCAS session array
|
||||
if (!isset($_SESSION[static::PHPCAS_SESSION_PREFIX])
|
||||
|| !is_array($_SESSION[static::PHPCAS_SESSION_PREFIX])) {
|
||||
$_SESSION[static::PHPCAS_SESSION_PREFIX] = array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a session value with the given key.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user