From a0204aef73e64ade222b568b0be311e4bcf1ba4e Mon Sep 17 00:00:00 2001
From: pbarroca <pbarroca@afi-sa.fr>
Date: Thu, 3 Dec 2015 09:31:33 +0100
Subject: [PATCH] rel #33948 : fix RT

---
 .../WebService/SIGB/Koha/GetRecordsResponseReader.php     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/library/Class/WebService/SIGB/Koha/GetRecordsResponseReader.php b/library/Class/WebService/SIGB/Koha/GetRecordsResponseReader.php
index 34b15890816..2c41d6b943b 100644
--- a/library/Class/WebService/SIGB/Koha/GetRecordsResponseReader.php
+++ b/library/Class/WebService/SIGB/Koha/GetRecordsResponseReader.php
@@ -70,11 +70,13 @@ class Class_WebService_SIGB_Koha_GetRecordsResponseReader {
     if (false === ($doc = $this->_getReader()->read($xml)))
       return $this->_record;
 
-    if (!$record = $doc->record)
+    if (!$this->_hasChild('record', $doc))
       return $this->_record;
 
-    if ($id = $record->biblioitemnumber)
-      $this->_record->setId((string)$id);
+    $record = $doc->record;
+
+    if ($this->_hasChild('biblioitemnumber', $record))
+      $this->_record->setId((string)$record->biblioitemnumber);
 
     foreach($record->reserves->reserve as $xml_hold)
       $this->_handleHold($xml_hold);
-- 
GitLab