projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #13374 from cividesk/dev-627
[civicrm-core.git]
/
api
/
v3
/
examples
/
Contact
/
GetCountContact.php
diff --git
a/api/v3/examples/Contact/GetCountContact.php
b/api/v3/examples/Contact/GetCountContact.php
index 724616b3e58532675a86e7dca30d8c7c9fed1076..5bffef16fcd6aa1e57348fcfc749e327ffe40e03 100644
(file)
--- a/
api/v3/examples/Contact/GetCountContact.php
+++ b/
api/v3/examples/Contact/GetCountContact.php
@@
-9,9
+9,9
@@
* API result array
*/
function contact_getcount_example() {
* API result array
*/
function contact_getcount_example() {
- $params =
array(
+ $params =
[
'id' => 17,
'id' => 17,
-
)
;
+
]
;
try{
$result = civicrm_api3('Contact', 'getcount', $params);
try{
$result = civicrm_api3('Contact', 'getcount', $params);
@@
-21,11
+21,12
@@
function contact_getcount_example() {
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
$errorMessage = $e->getMessage();
$errorCode = $e->getErrorCode();
$errorData = $e->getExtraParams();
- return array(
- 'error' => $errorMessage,
+ return [
+ 'is_error' => 1,
+ 'error_message' => $errorMessage,
'error_code' => $errorCode,
'error_data' => $errorData,
'error_code' => $errorCode,
'error_data' => $errorData,
-
)
;
+
]
;
}
return $result;
}
return $result;