mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
try fixing race-condition: Call to a member function exists() on null
This commit is contained in:
parent
83e350958c
commit
b175b14294
@ -433,7 +433,7 @@ class Asyncservice
|
||||
//
|
||||
//if ($GLOBALS['egw_info']['user']['account_id'] != $job['account_id'])
|
||||
{
|
||||
// run notifications, before changing account_id of enviroment
|
||||
// run notifications, before changing account_id of environment
|
||||
Link::run_notifies();
|
||||
// unset all objects in $GLOBALS, which are created and used by ExecMethod, as they can contain user-data
|
||||
foreach($GLOBALS as $name => $value)
|
||||
@ -444,6 +444,12 @@ class Asyncservice
|
||||
$lang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
|
||||
unset($GLOBALS['egw_info']['user']);
|
||||
|
||||
// trying to fix errors in async service: Call to a member function xxxxx() on null
|
||||
if (!isset($GLOBALS['egw']->accounts))
|
||||
{
|
||||
$GLOBALS['egw']->accounts = Accounts::getInstance();
|
||||
}
|
||||
|
||||
if (($GLOBALS['egw']->session->account_id = $job['account_id']))
|
||||
{
|
||||
$GLOBALS['egw']->session->account_lid = Accounts::id2name($job['account_id']);
|
||||
|
Loading…
Reference in New Issue
Block a user