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:
c1b38a0
)
fix api wrapper as CRM_Core_Exception fatals on the PEAR exception getUserMessage...
author
eileen
<eileen@fuzion.co.nz>
Sun, 4 Aug 2013 06:18:02 +0000
(18:18 +1200)
committer
eileen
<eileen@fuzion.co.nz>
Sun, 4 Aug 2013 23:32:25 +0000
(11:32 +1200)
api/api.php
patch
|
blob
|
blame
|
history
diff --git
a/api/api.php
b/api/api.php
index 76637548ce14bd15f3499bf7737436abe82c2364..60d95f63a2d16ad8e0e10342ac19ac4e6bbe752a 100644
(file)
--- a/
api/api.php
+++ b/
api/api.php
@@
-123,7
+123,12
@@
function civicrm_api($entity, $action, $params, $extra = NULL) {
$data["sql"] = $error->getDebugInfo();
}
if (CRM_Utils_Array::value('debug', $apiRequest['params'])) {
- $data['debug_info'] = $error->getUserInfo();
+ if(method_exists($e, 'getUserInfo')) {
+ $data['debug_info'] = $error->getUserInfo();
+ }
+ if(method_exists($e, 'getExtraData')) {
+ $data['debug_info'] = $data + $error->getExtraData();
+ }
$data['trace'] = $e->getTraceAsString();
}
else{