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:
c2a6d23
)
Fix array_key_exists() PHP warning in Report Forms
author
Jerome Charaoui
<jcharaoui@cmaisonneuve.qc.ca>
Fri, 26 Aug 2016 18:12:59 +0000
(14:12 -0400)
committer
GitHub
<noreply@github.com>
Fri, 26 Aug 2016 18:12:59 +0000
(14:12 -0400)
If the query just below returns an empty set, PHP throws a warning about $customFields being undefined (null), so initialize it properly as an empty array.
CRM/Report/Form.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Report/Form.php
b/CRM/Report/Form.php
index aede7d823aa11c49967a15101f4524a405f9dc60..ccbaea07be552c104879a2e478fa419b4212de8a 100644
(file)
--- a/
CRM/Report/Form.php
+++ b/
CRM/Report/Form.php
@@
-2090,6
+2090,7
@@
class CRM_Report_Form extends CRM_Core_Form {
return;
}
+ $customFields = array();
$customFieldIds = array();
foreach ($this->_params['fields'] as $fieldAlias => $value) {
if ($fieldId = CRM_Core_BAO_CustomField::getKeyID($fieldAlias)) {