From: Seamus Lee Date: Tue, 30 May 2017 22:15:10 +0000 (+1000) Subject: CRM-20662 Ensure that the system only tries populating the domain_id field if there... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9cec4195124c96e609f14b38a4dbfd0a69488030;p=civicrm-core.git CRM-20662 Ensure that the system only tries populating the domain_id field if there is only 1 domain in the system --- diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index c3f9319287..aea404fd53 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -1094,7 +1094,7 @@ FROM `civicrm_dashboard_contact` JOIN `civicrm_contact` WHERE civicrm_dashboard_ */ public static function populateSMSProviderDomainId() { $count = CRM_Core_DAO::singleValueQuery("SELECT count(id) FROM civicrm_domain"); - if ($count = 1) { + if ($count == 1) { CRM_Core_DAO::executeQuery("UPDATE civicrm_sms_provider SET domain_id = (SELECT id FROM civicrm_domain)"); } if (!parent::checkFKExists('civicrm_sms_provider', 'FK_civicrm_sms_provider_domain_id')) {