[REF] Using ternary operation without nesting is deprecated and also using methods...
authorSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Jun 2020 22:45:53 +0000 (08:45 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Wed, 10 Jun 2020 22:45:53 +0000 (08:45 +1000)
CRM/Core/Form.php
tests/phpunit/CRM/Activity/BAO/ActivityTest.php

index efc615f3cad4341dc99bc8cb5ef075e448c7f8c5..d479943e37883597750c88046ee106fbacca588b 100644 (file)
@@ -1469,7 +1469,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
       $options = $info['values'];
     }
     if (!array_key_exists('placeholder', $props)) {
-      $props['placeholder'] = $required ? ts('- select -') : CRM_Utils_Array::value('context', $props) == 'search' ? ts('- any -') : ts('- none -');
+      $props['placeholder'] = $required ? ts('- select -') : (CRM_Utils_Array::value('context', $props) == 'search' ? ts('- any -') : ts('- none -'));
     }
     // Handle custom field
     if (strpos($name, 'custom_') === 0 && is_numeric($name[7])) {
index 8dff8bcfc3a1ad38e76464a790f3f9e9538da5c6..ece7b501bbcee6bd0166645fc3ee4eddb39c30ac 100644 (file)
@@ -1613,6 +1613,7 @@ $text
   protected function setShowCaseActivitiesInCore(bool $val) {
     Civi::settings()->set('civicaseShowCaseActivities', $val ? 1 : 0);
     CRM_Core_Component::getEnabledComponents();
+    Civi::$statics['CRM_Core_Component']['info']['CiviCase'] = new CRM_Case_Info('CiviCase', 'CRM_Case', 7);
     Civi::$statics['CRM_Core_Component']['info']['CiviCase']->info['showActivitiesInCore'] = $val;
   }