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:
c9f0d44
)
Add extra output info when getsingle fails as this seems to be common in intermittant...
author
eileen
<emcnaughton@wikimedia.org>
Sun, 17 Feb 2019 03:41:35 +0000
(16:41 +1300)
committer
eileen
<emcnaughton@wikimedia.org>
Sun, 17 Feb 2019 03:41:35 +0000
(16:41 +1300)
Civi/Test/Api3TestTrait.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Test/Api3TestTrait.php
b/Civi/Test/Api3TestTrait.php
index 2a10abf7e7357f7fc2a13c7dbbba3c7618ab6e4e..96e41b9d7a73d7a04a5e1bd06eb837586437c704 100644
(file)
--- a/
Civi/Test/Api3TestTrait.php
+++ b/
Civi/Test/Api3TestTrait.php
@@
-202,7
+202,12
@@
trait Api3TestTrait {
);
$result = $this->civicrm_api($entity, 'getsingle', $params);
if (!is_array($result) || !empty($result['is_error']) || isset($result['values'])) {
);
$result = $this->civicrm_api($entity, 'getsingle', $params);
if (!is_array($result) || !empty($result['is_error']) || isset($result['values'])) {
- throw new \Exception('Invalid getsingle result' . print_r($result, TRUE));
+ $unfilteredResult = $this->civicrm_api($entity, 'get', $params);
+ throw new \Exception(
+ 'Invalid getsingle result' . print_r($result, TRUE)
+ . "\n entity: $entity . \n params \n " . print_r($params, TRUE)
+ . "\n entities retrieved with blank params \n" . print_r($unfilteredResult, TRUE)
+ );
}
if ($checkAgainst) {
// @todo - have gone with the fn that unsets id? should we check id?
}
if ($checkAgainst) {
// @todo - have gone with the fn that unsets id? should we check id?