From 354041b766aab4f87a5e0af24ac588d46b836011 Mon Sep 17 00:00:00 2001
From: Alex Arnaud <alex.arnaud@biblibre.com>
Date: Thu, 28 Mar 2024 10:38:44 +0000
Subject: [PATCH] hotline#199203 : RT Fix patch

---
 library/Class/WebService/SIGB/Emprunteur.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/library/Class/WebService/SIGB/Emprunteur.php b/library/Class/WebService/SIGB/Emprunteur.php
index 9f4f5c65759..c2afc8c0b75 100644
--- a/library/Class/WebService/SIGB/Emprunteur.php
+++ b/library/Class/WebService/SIGB/Emprunteur.php
@@ -811,20 +811,20 @@ class Class_WebService_SIGB_Emprunteur {
       return false;
 
     $this->_service->saveEmprunteur($this);
-    if ( ! $this->_service->hasErrors() && $user) {
-      $this->_saveCache($user);
-      return true;
-    }
+    if ( ! $this->_service->hasErrors())
+      return $this->_saveCache($user);
 
     $this->_errors = $this->_service->getErrors();
     return false;
   }
 
 
-    protected function _saveCache(?Class_Users $user = null): void
+    protected function _saveCache(?Class_Users $user = null): bool
     {
       if ($user)
         Class_WebService_SIGB_EmprunteurCache::newInstance()->save($user, $this);
+
+      return true;
     }
 
 
-- 
GitLab