From 5710feaa6cb1abb33c6f4e45f92cb260be58de4f Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Thu, 14 Mar 2024 15:08:14 +0100 Subject: [PATCH] Do not try to `explode()` return parameter when it already is an array --- Civi/RemoteToolsRequest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Civi/RemoteToolsRequest.php b/Civi/RemoteToolsRequest.php index 72bce4c..01891f9 100644 --- a/Civi/RemoteToolsRequest.php +++ b/Civi/RemoteToolsRequest.php @@ -346,9 +346,12 @@ public function wasExecuted() */ public function getOriginalReturnFields() { - $return_string = \CRM_Utils_Array::value('return', $this->original_request, ''); - if ($return_string) { - return explode(',', $return_string); + $return = \CRM_Utils_Array::value('return', $this->original_request, ''); + if (is_array($return)) { + return $return; + } + if (is_string($return)) { + return explode(',', $return); } else { return []; }