mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
"found and fixed the real cause, appsession got called after session was commited (and therefore encrypted), these calles get now silently ignored"
This commit is contained in:
parent
8edc407e4d
commit
71063707a4
@ -1037,6 +1037,11 @@ class egw_session
|
|||||||
*/
|
*/
|
||||||
public static function &appsession($location = 'default', $appname = '', $data = '##NOTHING##')
|
public static function &appsession($location = 'default', $appname = '', $data = '##NOTHING##')
|
||||||
{
|
{
|
||||||
|
if (isset($_SESSION[self::EGW_SESSION_ENCRYPTED]))
|
||||||
|
{
|
||||||
|
//error_log(__METHOD__.' called after session was encrypted --> ignored!');
|
||||||
|
return false; // can no longer store something in the session, eg. because commit_session() was called
|
||||||
|
}
|
||||||
if (!$appname)
|
if (!$appname)
|
||||||
{
|
{
|
||||||
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
|
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||||
@ -1056,17 +1061,6 @@ class egw_session
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// check if the app-session is set to something else then an array, if that's the case set it to an empty array
|
|
||||||
// otherwise you get a PHP Fatal error: Cannot use string offset as an array (happens sometimes in felamimail)
|
|
||||||
if (isset($_SESSION[self::EGW_APPSESSION_VAR][$appname]) && !is_array($_SESSION[self::EGW_APPSESSION_VAR][$appname]))
|
|
||||||
{
|
|
||||||
error_log(__METHOD__."($location,$appname,$data) gettype(_SESSION[self::EGW_APPSESSION_VAR][$appname])=".gettype($_SESSION[self::EGW_APPSESSION_VAR][$appname]).' --> set to array()!');
|
|
||||||
if (isset($_SESSION[self::EGW_APPSESSION_VAR]) && !is_array($_SESSION[self::EGW_APPSESSION_VAR]))
|
|
||||||
{
|
|
||||||
$_SESSION[self::EGW_APPSESSION_VAR] = array();
|
|
||||||
}
|
|
||||||
$_SESSION[self::EGW_APPSESSION_VAR][$appname] = array();
|
|
||||||
}
|
|
||||||
$_SESSION[self::EGW_APPSESSION_VAR][$appname][$location] =& $data;
|
$_SESSION[self::EGW_APPSESSION_VAR][$appname][$location] =& $data;
|
||||||
$ret =& $_SESSION[self::EGW_APPSESSION_VAR][$appname][$location];
|
$ret =& $_SESSION[self::EGW_APPSESSION_VAR][$appname][$location];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user