- Timestamp:
- May 4, 2014 12:29:05 AM (10 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r479 r480 807 807 unset($this->_carry_queries[$k]); 808 808 } 809 if ($unset && array_key_exists($k, $_REQUEST)) {809 if ($unset && (isset($_REQUEST) && array_key_exists($k, $_REQUEST))) { 810 810 unset($_REQUEST[$k], $_GET[$k], $_POST[$k], $_COOKIE[$k]); 811 811 } -
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; -
trunk/lib/Prefs.inc.php
r479 r480 275 275 // - or the new value is different than the default 276 276 // - or there is a previously existing saved key. 277 if (! array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['defaults'])277 if (!(isset($_SESSION['_prefs'][$this->_ns]['defaults']) && array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['defaults'])) 278 278 || $_SESSION['_prefs'][$this->_ns]['defaults'][$key] != $val 279 || array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['saved'])) {279 || (isset($_SESSION['_prefs'][$this->_ns]['saved']) && array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['saved']))) { 280 280 $_SESSION['_prefs'][$this->_ns]['saved'][$key] = $val; 281 281 $app->logMsg(sprintf('Setting session preference %s => %s', $key, getDump($val, true)), LOG_DEBUG, __FILE__, __LINE__); … … 348 348 case 'session': 349 349 case 'database': 350 return array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['saved']);350 return (isset($_SESSION['_prefs'][$this->_ns]['saved']) && array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['saved'])); 351 351 352 352 case 'cookie': 353 353 $name = $this->_getCookieName($key); 354 return array_key_exists($name, $_COOKIE);354 return (isset($_COOKIE) && array_key_exists($name, $_COOKIE)); 355 355 } 356 356
Note: See TracChangeset
for help on using the changeset viewer.