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:
887a402
)
Added checks for valid array keys. CRM-12464
author
AS
<as@dell12.(none)>
Tue, 30 Apr 2013 04:33:41 +0000
(21:33 -0700)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 29 May 2013 21:32:22 +0000
(14:32 -0700)
----------------------------------------
* CRM-12464:
http://issues.civicrm.org/jira/browse/CRM-12464
CRM/Core/PseudoConstant.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/PseudoConstant.php
b/CRM/Core/PseudoConstant.php
index 4c551a6c702a504d66298ef88dfc904e9e641dad..b219ec42e4e73e8cc22cae7d329ebc70f9a48da9 100644
(file)
--- a/
CRM/Core/PseudoConstant.php
+++ b/
CRM/Core/PseudoConstant.php
@@
-412,6
+412,9
@@
class CRM_Core_PseudoConstant {
public static function get($daoName, $fieldName, $params = array()) {
$dao = new $daoName;
$fields = $dao->fields();
+ if (empty($fields[$fieldName])) {
+ return FALSE;
+ }
$fieldSpec = $fields[$fieldName];
// If the field is an enum, use explode the enum definition and return the array.