Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1647
 
1830
 
1830
 
sessions.php
_> 11 <?php
  22 /*
<> 3 -  $Id: sessions.php,v 1.19 2003/07/02 22:10:34 hpdl Exp $
   3+  $Id: sessions.php 1830 2008-01-30 00:58:21Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2007 osCommerce
   8+  Copyright (c) 2008 osCommerce
99 
  1010   Released under the GNU General Public License
  1111 */
  1212 
<>  13+  if ( (PHP_VERSION >= 4.3) && ((bool)ini_get('register_globals') == false) ) {
   14+    @ini_set('session.bug_compat_42', 1);
   15+    @ini_set('session.bug_compat_warn', 0);
   16+  }
   17+
1318   if (STORE_SESSIONS == 'mysql') {
  1419     if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) {
  1520       $SESS_LIFE = 1440;
     
 !
3136         return $value['value'];
  3237       }
  3338 
<> 34 -      return false;
   39+      return '';
3540     }
  3641 
  3742     function _sess_write($key, $val) {
     
 !
104109       if (PHP_VERSION < 4.3) {
  105110         return session_register($variable);
  106111       } else {
<> 107 -        $_SESSION[$variable] = (isset($GLOBALS[$variable])) ? $GLOBALS[$variable] : null;
  108 -
  109 -        $GLOBALS[$variable] =& $_SESSION[$variable];
   112+        if (isset($GLOBALS[$variable])) {
   113+          $_SESSION[$variable] =& $GLOBALS[$variable];
   114+        } else {
   115+          $_SESSION[$variable] = null;
   116+        }
110117       }
  111118     }
  112119 
     
 !
117124     if (PHP_VERSION < 4.3) {
  118125       return session_is_registered($variable);
  119126     } else {
<> 120 -      return isset($_SESSION[$variable]);
   127+      return isset($_SESSION) && array_key_exists($variable, $_SESSION);
<_ 121128     }
  122129   }
  123130