From 78e1efac45db6096fcc32ade7739787b98287e31 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 29 Dec 2015 22:27:00 -0500 Subject: [PATCH] More accurate message for addField error --- CRM/Core/Form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index ab3e9e89de..90e16dde38 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1225,7 +1225,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { return 'get'; } // If you get this exception try adding more cases above. - throw new Exception("Cannot determine api action for " . __CLASS__); + throw new Exception("Cannot determine api action for " . get_class($this)); } /** @@ -1449,7 +1449,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { case 'Select': $props['class'] = CRM_Utils_Array::value('class', $props, 'big') . ' crm-select2'; if (!array_key_exists('placeholder', $props)) { - $props['placeholder'] = $required ? ts('- select -') : $context == 'search' ? ts('- any -') : ts('- none -'); + $props['placeholder'] = $required ? ts('- select -') : ($context == 'search' ? ts('- any -') : ts('- none -')); } // TODO: Add and/or option for fields that store multiple values return $this->add('select', $name, $label, $options, $required, $props); -- 2.25.1