[phplib-dev] cvs commit From: max (phplib-dev <email protected>)
Date: 01/05/01

From: max
Date: Fri Jan 5 14:58:59 2001
Modified files:
      php-lib/php/user4.inc

Log message:
bugfixes

Index: php-lib/php/user4.inc
diff -u php-lib/php/user4.inc:1.2 php-lib/php/user4.inc:1.3
--- php-lib/php/user4.inc:1.2 Fri Jan 5 09:57:28 2001
+++ php-lib/php/user4.inc Fri Jan 5 14:58:55 2001
@@ -6,7 +6,7 @@
  * Boris Erdmann, Kristian Koehntopp
  * Copyright (c) 2001, Maxim Derkachev <kot <email protected>>
  *
- * $Id: user4.inc,v 1.2 2001/01/05 08:57:28 max Exp $
+ * $Id: user4.inc,v 1.3 2001/01/05 13:58:55 max Exp $
  *
  */
 
@@ -35,7 +35,7 @@
     $things = explode (",", $things);
     foreach ($things as $thing) {
       $thing = trim($thing);
- if (!isset($GLOBALS[$things])) continue;
+ if (!isset($GLOBALS[$thing])) continue;
       $GLOBALS[$this->vars_array][$thing] =& $GLOBALS[$thing];
     }
   }
@@ -92,7 +92,7 @@
   /* serialize()
      serializes user data (stored in $GLOBALS[$this->vars_array])
      */
- function serialize (&$str) {
+ function serialize () {
     $str = serialize($GLOBALS[$this->vars_array]);
     return $str;
   }
@@ -103,7 +103,7 @@
      */
   function freeze() {
     $str = '';
- $this->serialize($str);
+ $str = $this->serialize();
     $r = $this->that->ac_store($this->id, $this->name, $str);
     if(!$r) $this->that->ac_halt("User: freeze() failed.");
   }
@@ -115,7 +115,7 @@
   function thaw() {
     $vals = $this->that->ac_get_value($this->id, $this->name);
     $GLOBALS[$this->vars_array] = unserialize ($vals);
- if ($this->register_globals) {
+ if ($this->register_globals && is_array ($GLOBALS[$this->vars_array]) ) {
       reset ($GLOBALS[$this->vars_array]);
       while (list ($k, $v) = each ($GLOBALS[$this->vars_array])) {
         $GLOBALS[$k] = $v;

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>