isset added to verify if class User comm array element is set or not
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Mon, 14 Mar 2011 20:21:52 +0000 (21:21 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Mon, 14 Mar 2011 20:21:52 +0000 (21:21 +0100)
web/Obj/brisk.phh

index 3f65f17..73e5147 100644 (file)
@@ -694,8 +694,10 @@ class User {
 
     $i_start = (1 > ($from->step - COMM_N) ? 1 : ($from->step - COMM_N)); 
     for ($i = $i_start ; $i < $from->step ; $i++) {
-      $ii = $i % COMM_N;
-      $this->comm[$ii] = $from->comm[$ii];
+        $ii = $i % COMM_N;
+        if (isset($from->comm[$ii])) {
+            $this->comm[$ii] = $from->comm[$ii];
+        }
     }
     $this->asta_card  = $from->asta_card;
     $this->asta_pnt   = $from->asta_pnt;