From c7d4838400465f25930364ca2eb516463fff4f9b Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Thu, 20 Dec 2018 17:17:53 +0100 Subject: [PATCH] If no generic gender is found, proceed without update --- update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.php b/update.php index 19c5d874b2..449b139965 100644 --- a/update.php +++ b/update.php @@ -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++; } } -- 2.39.5