From: <ral...@us...> - 2012-09-26 10:18:25
|
Author: ralfbecker Date: Wed Sep 26 12:18:18 2012 New Revision: 40316 URL: http://svn.stylite.de/viewvc/egroupware?rev=40316&view=rev Log: additionally check prefs read from cache, if they are of type array, otherwise read them from db, might help with APC at least in some versions not seem to deal correctly with out-of-memory Modified: trunk/phpgwapi/inc/class.preferences.inc.php Modified: trunk/phpgwapi/inc/class.preferences.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/class.preferences.inc.php?rev=40316&r1=40315&r2=40316&view=diff ============================================================================== --- trunk/phpgwapi/inc/class.preferences.inc.php (original) +++ trunk/phpgwapi/inc/class.preferences.inc.php Wed Sep 26 12:18:18 2012 @@ -160,7 +160,8 @@ foreach((array)$ids as $id) { $prefs[$id] = egw_cache::getInstance(__CLASS__, $id); - if (!isset($prefs[$id])) $db_read[] = $id; + // if prefs are not returned (null) or not an array, read them from db + if (!isset($prefs[$id]) && !is_array($prefs[$id])) $db_read[] = $id; } if ($db_read) { |