projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c1a84a
)
CRM_Core_DAO - Throw clearer error message about pseudoconstants
author
Tim Otten
<totten@civicrm.org>
Mon, 3 Jun 2013 02:41:12 +0000
(22:41 -0400)
committer
Tim Otten
<totten@civicrm.org>
Mon, 3 Jun 2013 02:41:12 +0000
(22:41 -0400)
CRM/Core/DAO.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/DAO.php
b/CRM/Core/DAO.php
index ecf28df3fc1cc91a19045eda56b605c0f0dbdb8a..f37b8d3e1675c948ce092b343876a33bb010c37e 100644
(file)
--- a/
CRM/Core/DAO.php
+++ b/
CRM/Core/DAO.php
@@
-1325,6
+1325,9
@@
SELECT contact_id
}
$constant = CRM_Utils_Array::value('pseudoconstant', $value);
if (!empty($constant)) {
+ if (empty($constant['name'])) {
+ throw new CRM_Core_Exception("Failed to choose value for $daoName ($name) -- missing pseudo-constant name");
+ }
$constantValues = CRM_Utils_PseudoConstant::getConstant($constant['name']);
if (!empty($constantValues)) {
$constantOptions = array_keys($constantValues);