Changeset 478 for trunk/lib/App.inc.php


Ignore:
Timestamp:
May 3, 2014 9:13:05 PM (10 years ago)
Author:
anonymous
Message:

Using array_key_exists() instead of isset() where null may be a used value. Added params to Prefs constructor. Include setDefault functionality for cookie storage types. Finished cookie storagetype of Prefs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r477 r478  
    230230        if ($param === null) {
    231231            return $this->_params;
    232         } else if (isset($this->_params[$param])) {
     232        } else if (array_key_exists($param, $this->_params)) {
    233233            return $this->_params[$param];
    234234        } else {
     
    802802        }
    803803        foreach ($query_key as $k) {
    804             if (isset($this->_carry_queries[$k])) {
     804            if (array_key_exists($k, $this->_carry_queries)) {
    805805                // Remove the value of the specified query argument from the _carry_queries array.
    806806                $this->logMsg(sprintf('Dropping carried query: %s => %s', $k, $this->_carry_queries[$k]), LOG_DEBUG, __FILE__, __LINE__);
    807807                unset($this->_carry_queries[$k]);
    808808            }
    809             if ($unset && isset($_REQUEST[$k])) {
     809            if ($unset && array_key_exists($k, $_REQUEST)) {
    810810                unset($_REQUEST[$k], $_GET[$k], $_POST[$k], $_COOKIE[$k]);
    811811            }
Note: See TracChangeset for help on using the changeset viewer.