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:
6793d2e
)
CRM-14249 - fix fatal error when anonymous user accesses civicrm/mailing/view.
author
Dave Greenberg
<dave@civicrm.org>
Sun, 23 Feb 2014 02:35:45 +0000
(18:35 -0800)
committer
Dave Greenberg
<dave@civicrm.org>
Sun, 23 Feb 2014 02:35:45 +0000
(18:35 -0800)
----------------------------------------
* CRM-14249: Can't view public mailings when logged out
http://issues.civicrm.org/jira/browse/CRM-14249
CRM/Mailing/BAO/Mailing.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Mailing/BAO/Mailing.php
b/CRM/Mailing/BAO/Mailing.php
index c9571bf28b3b7146529f05aaa6406c64891e4926..fe6ce08e817a888e7d571ac5457d5c13b0ac9366 100644
(file)
--- a/
CRM/Mailing/BAO/Mailing.php
+++ b/
CRM/Mailing/BAO/Mailing.php
@@
-1110,6
+1110,11
@@
ORDER BY civicrm_email.is_bulkmail DESC
if ($contactDetails) {
$contact = $contactDetails;
}
+ elseif ($contactId === 0) {
+ //anonymous user
+ $contact = array();
+ CRM_Utils_Hook::tokenValues($contact, $contactId, $job_id);
+ }
else {
$params = array(array('contact_id', '=', $contactId, 0, 0));
list($contact, $_) = CRM_Contact_BAO_Query::apiQuery($params);