From: eileen Date: Mon, 9 Mar 2020 01:25:42 +0000 (+1300) Subject: Fix another instance of silly use of CRM_Utils_Array::value X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=731870821d4ecfcd30fcc33413d3ff46782683f6;p=civicrm-core.git Fix another instance of silly use of CRM_Utils_Array::value --- diff --git a/Civi/API/Subscriber/ChainSubscriber.php b/Civi/API/Subscriber/ChainSubscriber.php index 37c8688a4c..031d05b77a 100644 --- a/Civi/API/Subscriber/ChainSubscriber.php +++ b/Civi/API/Subscriber/ChainSubscriber.php @@ -54,7 +54,7 @@ class ChainSubscriber implements EventSubscriberInterface { $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); }