From 3afd0ccf1df5a614052faf12d1186ee1a6b9f6b5 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Tue, 16 Feb 2021 19:13:57 -0800 Subject: [PATCH] Check fo ids to update database --- docroot/modules/humsci/hs_person/hs_person.install | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docroot/modules/humsci/hs_person/hs_person.install b/docroot/modules/humsci/hs_person/hs_person.install index 2c57563e7f..e81a208f3c 100644 --- a/docroot/modules/humsci/hs_person/hs_person.install +++ b/docroot/modules/humsci/hs_person/hs_person.install @@ -87,9 +87,10 @@ function hs_person_update_8004() { ->condition('type', 'hs_person') ->notExists('field_hs_person_image') ->execute(); - - $database->update('migrate_map_hs_capx') - ->fields(['source_row_status' => 1]) - ->condition('destid1', array_values($nids), 'IN') - ->execute(); + if ($nids) { + $database->update('migrate_map_hs_capx') + ->fields(['source_row_status' => 1]) + ->condition('destid1', array_values($nids), 'IN') + ->execute(); + } }