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:
fb32de4
)
CRM-13072 a bit of extra getcount error handling
author
eileen
<eileen@fuzion.co.nz>
Sun, 28 Jul 2013 10:02:56 +0000
(22:02 +1200)
committer
eileen
<eileen@fuzion.co.nz>
Sun, 28 Jul 2013 10:02:56 +0000
(22:02 +1200)
api/v3/Generic.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Generic.php
b/api/v3/Generic.php
index d2619f0e1c442e1e293ca727e89408dede327fd5..8490145b59dbc7956746c605aa646fbd1abe803f 100644
(file)
--- a/
api/v3/Generic.php
+++ b/
api/v3/Generic.php
@@
-139,6
+139,9
@@
function civicrm_api3_generic_getcount($apiRequest) {
if(is_numeric (CRM_Utils_Array::value('values', $result))) {
return (int) $result['values'];
}
+ if(!isset($result['count'])) {
+ throw new API_Exception(ts('Unexpected result from getcount') . print_r($result, TRUE));
+ }
return $result['count'];
}