From 6102c55c4f45dfac9e5f6b171dc7aced07651a49 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Thu, 11 Jan 2018 23:45:37 -0600 Subject: [PATCH] CRM-21652: Without using 'finally' clause --- CRM/Utils/System/Drupal8.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 95b317b74f..db4a7b2f9b 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -81,13 +81,12 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { try { $account->save(); + $config->inCiviCRM = FALSE; } catch (\Drupal\Core\Entity\EntityStorageException $e) { + $config->inCiviCRM = FALSE; return FALSE; } - finally { - $config->inCiviCRM = TRUE; - } // Send off any emails as required. // Possible values for $op: -- 2.25.1