Skip to content

Commit 043549b

Browse files
committed
refactoring
1 parent e45d45b commit 043549b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lam/lib/selfService.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,14 +835,14 @@ class selfServiceProfile {
835835
/**
836836
* Converts the export data back to a self-service profile.
837837
*
838-
* @param array<string, string|int> $data export data
838+
* @param array<string, string|int|null> $data export data
839839
* @return selfServiceProfile profile
840840
*/
841841
public static function import($data): selfServiceProfile {
842842
$profile = new selfServiceProfile();
843843
$vars = get_class_vars(selfServiceProfile::class);
844844
foreach ($data as $key => $value) {
845-
if (array_key_exists($key, $vars)) {
845+
if (array_key_exists($key, $vars) && ($value !== null)) {
846846
$profile->$key = $value;
847847
}
848848
}

0 commit comments

Comments
 (0)