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:
694db87
)
CRM-14966 - ensure we have a contactid before inserting dashboard item.
author
Jamie McClelland
<jm@mayfirst.org>
Wed, 9 Jul 2014 20:00:51 +0000
(16:00 -0400)
committer
Jamie McClelland
<jm@mayfirst.org>
Wed, 9 Jul 2014 20:00:51 +0000
(16:00 -0400)
----------------------------------------
* CRM-14966: inserting dashboard item using api from cli results in sql exception
https://issues.civicrm.org/jira/browse/CRM-14966
CRM/Core/BAO/Dashboard.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/BAO/Dashboard.php
b/CRM/Core/BAO/Dashboard.php
index 21abcc28d9fb4ddd0c2ffab41ee2ed3035bb947f..3e7befb412af77e8183f67d5548c30e8f9da3dc4 100644
(file)
--- a/
CRM/Core/BAO/Dashboard.php
+++ b/
CRM/Core/BAO/Dashboard.php
@@
-472,7
+472,10
@@
class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
else {
//Get the id of Logged in User
$session = CRM_Core_Session::singleton();
- $contactIDs[] = $session->get('userID');
+ $contactID = $session->get('userID');
+ if(!empty($contactID)) {
+ $contactIDs[] = $session->get('userID');
+ }
}
if (!empty($contactIDs)) {