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

This commit is contained in:
Ralf Becker 2012-09-26 10:18:47 +00:00
parent eaebb0d27a
commit 54317da546

View File

@ -160,7 +160,8 @@ class preferences
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)
{