1
1
Fork 0

If no generic gender is found, proceed without update

This commit is contained in:
Jeroen De Meerleer 2018-12-20 17:17:53 +01:00 committed by Hypolite Petovan
parent 5f1e2b2e49
commit c7d4838400

View file

@ -289,12 +289,12 @@ function update_1293()
// defaulting to empty string
$key = '';
}
DBA::update('contact', ['gender' => $key], ['id' => $gender['id']]);
logger::log('Updated contact ' . $gender['id'] . ' to gender ' . $key . ' (was: ' . $gender['gender'] . ')');
if ($key == '') {
$fail++;
} else {
DBA::update('contact', ['gender' => $key], ['id' => $gender['id']]);
logger::log('Updated contact ' . $gender['id'] . ' to gender ' . $key . ' (was: ' . $gender['gender'] . ')');
$success++;
}
}