From 5f6e075fb3dc321ee1fdbbefc744647339f19645 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 14 Mar 2011 21:21:52 +0100 Subject: [PATCH] isset added to verify if class User comm array element is set or not --- web/Obj/brisk.phh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 3f65f17..73e5147 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -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; -- 2.17.1