From d9ecf3bd4579e34eb68b657a8ebb8e1296a8b71e Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 17 Apr 2004 14:09:05 +0000 Subject: [PATCH] fixed problems with empty values --- lam/lib/profiles.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lam/lib/profiles.inc b/lam/lib/profiles.inc index 130a9002..a00c3a9c 100644 --- a/lam/lib/profiles.inc +++ b/lam/lib/profiles.inc @@ -209,7 +209,12 @@ function saveUserProfile($attributes, $profile) { // write attributes $keys = array_keys($attributes); for ($i = 0; $i < sizeof($keys); $i++) { - $line = $keys[$i] . ": " . implode("+::+", $attributes[$keys[$i]]) . "\n"; + if (isset($attributes[$keys[$i]])) { + $line = $keys[$i] . ": " . implode("+::+", $attributes[$keys[$i]]) . "\n"; + } + else { + $line = $keys[$i] . ": "; + } fputs($file, $line); } // close file