fixed problem caused by non existing session-object in setup, reported und the user list

This commit is contained in:
Ralf Becker 2007-07-27 09:36:33 +00:00
parent 07c02d6f91
commit 6adc9e307f

View File

@ -751,7 +751,7 @@ class accounts extends accounts_backend
//echo "<p>accounts::setup_cache() use_session_cache=$this->use_session_cache, is_array(this->cache)=".(int)is_array($this->cache)."</p>\n";
if (is_array($this->cache)) return; // cache is already setup
if ($this->use_session_cache && isset($GLOBALS['egw']->accounts) && !is_array($GLOBALS['egw']->accounts->cache))
if ($this->use_session_cache && isset($GLOBALS['egw']->accounts) && !is_array($GLOBALS['egw']->accounts->cache) && is_object($GLOBALS['egw']->session))
{
//echo "<p>restoring the session-cache for \$GLOBALS['egw']->accounts</p>\n";
$GLOBALS['egw']->accounts->cache = $GLOBALS['egw']->session->appsession('accounts_cache','phpgwapi');