fixed problems with empty values

This commit is contained in:
Roland Gruber 2004-04-17 14:09:05 +00:00
parent 0f7a864415
commit d9ecf3bd45
1 changed files with 6 additions and 1 deletions

View File

@ -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