From f7d2f10ecddcadb17ed1a98266560bc3d435354b Mon Sep 17 00:00:00 2001
From: Alex Arnaud <alex.arnaud@biblibre.com>
Date: Thu, 14 Mar 2024 14:43:24 +0000
Subject: [PATCH] hotline#198092 : fix delData() call in Decalog connector

---
 library/Class/WebService/SIGB/Decalog/Service.php   | 2 +-
 tests/library/Class/WebService/SIGB/DecalogTest.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Class/WebService/SIGB/Decalog/Service.php b/library/Class/WebService/SIGB/Decalog/Service.php
index ec96ed04e44..ab3bb1db794 100644
--- a/library/Class/WebService/SIGB/Decalog/Service.php
+++ b/library/Class/WebService/SIGB/Decalog/Service.php
@@ -314,7 +314,7 @@ class Class_WebService_SIGB_Decalog_Service extends Class_WebService_SIGB_Abstra
 
   protected function _callDelAction(string $url, array $params = []) : string {
     return $this->httpDelete($url,
-                             $params,
+                             http_build_query($params),
                              Zend_Http_Client::ENC_URLENCODED,
                              $this->_header());
   }
diff --git a/tests/library/Class/WebService/SIGB/DecalogTest.php b/tests/library/Class/WebService/SIGB/DecalogTest.php
index 1ba97343be8..f72f0cd61e9 100644
--- a/tests/library/Class/WebService/SIGB/DecalogTest.php
+++ b/tests/library/Class/WebService/SIGB/DecalogTest.php
@@ -557,7 +557,7 @@ class DecalogOperationsTest extends DecalogAuthenticationTest {
       ->answers(DecalogFixtures::jsonRenewRecordOK())
       ->whenCalled('delData')
       ->with('http://decalog-sigb/my-institution-code/booking/user/3396790941099222416/2974201090410743352',
-             [],
+             '',
              'application/x-www-form-urlencoded',
              ['headers' => 'apikey:my-key'])
       ->answers(DecalogFixtures::jsonDeleteReserveOK())
-- 
GitLab