We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e45d45b commit 043549bCopy full SHA for 043549b
1 file changed
lam/lib/selfService.inc
@@ -835,14 +835,14 @@ class selfServiceProfile {
835
/**
836
* Converts the export data back to a self-service profile.
837
*
838
- * @param array<string, string|int> $data export data
+ * @param array<string, string|int|null> $data export data
839
* @return selfServiceProfile profile
840
*/
841
public static function import($data): selfServiceProfile {
842
$profile = new selfServiceProfile();
843
$vars = get_class_vars(selfServiceProfile::class);
844
foreach ($data as $key => $value) {
845
- if (array_key_exists($key, $vars)) {
+ if (array_key_exists($key, $vars) && ($value !== null)) {
846
$profile->$key = $value;
847
}
848
0 commit comments