Skip to content

Commit

Permalink
Fix another instance of silly use of CRM_Utils_Array::value
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Mar 9, 2020
1 parent 71223c5 commit 7318708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Civi/API/Subscriber/ChainSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function onApiRespond(\Civi\API\Event\RespondEvent $event) {
$apiRequest = $event->getApiRequest();
if ($apiRequest['version'] < 4) {
$result = $event->getResponse();
if (\CRM_Utils_Array::value('is_error', $result, 0) == 0) {
if (!is_array($result) || ($result['is_error'] ?? 0) == 0) {
$this->callNestedApi($event->getApiKernel(), $apiRequest['params'], $result, $apiRequest['action'], $apiRequest['entity'], $apiRequest['version']);
$event->setResponse($result);
}
Expand Down

0 comments on commit 7318708

Please sign in to comment.