Changeset 480 for trunk/lib/Cache.inc.php
- Timestamp:
- May 4, 2014 12:29:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Cache.inc.php
r479 r480 211 211 } 212 212 213 if ( array_key_exists($key, $_SESSION['_cache'][$this->_ns])) {213 if (isset($_SESSION['_cache'][$this->_ns]) && array_key_exists($key, $_SESSION['_cache'][$this->_ns])) { 214 214 $app->logMsg(sprintf('Retreiving %s from cache.', $key), LOG_DEBUG, __FILE__, __LINE__); 215 215 // Move the accessed cached datum to the top of the stack. Maybe somebody knows a better way to do this? … … 240 240 } 241 241 242 return array_key_exists($key, $_SESSION['_cache'][$this->_ns]);242 return (isset($_SESSION['_cache'][$this->_ns]) && array_key_exists($key, $_SESSION['_cache'][$this->_ns])); 243 243 } 244 244 … … 251 251 public function delete($key) 252 252 { 253 if ( array_key_exists($key, $_SESSION['_cache'][$this->_ns])) {253 if (isset($_SESSION['_cache'][$this->_ns]) && array_key_exists($key, $_SESSION['_cache'][$this->_ns])) { 254 254 unset($_SESSION['_cache'][$this->_ns][$key]); 255 255 return true;
Note: See TracChangeset
for help on using the changeset viewer.