Bug #9370: New session code fix
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 5 Nov 2010 21:46:37 +0000 (15:46 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 5 Nov 2010 21:47:24 +0000 (15:47 -0600)
ingo/lib/Storage.php

index e4b65fa..968fbd5 100644 (file)
@@ -132,11 +132,10 @@ class Ingo_Storage
         /* Don't cache if using shares. */
         if ($cache && empty($GLOBALS['ingo_shares'])) {
             if (!isset($this->_cache[$field])) {
+                $cached = $GLOBALS['session']->retrieve($_SESSION['ingo']['storage'][$field]);
                 $this->_cache[$field] = array(
                     'mod' => false,
-                    'ob' => isset($_SESSION['ingo']['storage'][$field])
-                        ? $GLOBALS['session'][$_SESSION['ingo']['storage'][$field]]
-                        : $this->_retrieve($field, $readonly)
+                    'ob' => $cached ? $cached : $this->_retrieve($field, $readonly)
                 );
             }
             $ob = $this->_cache[$field]['ob'];