[Patches] [PATCH] [SIGNED-OFF] bug 7239 fix to avoid error being thrown even

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Tue Dec 6 19:05:02 NZDT 2011


From: Chris Hall <chrish at catalyst.net.nz>
Date: Tue, 6 Dec 2011 16:03:59 +1300
Subject: [PATCH] [SIGNED-OFF] bug 7239 fix to avoid error being thrown even
 though a record is created

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
When creating an item in acquisitions while ordering and not filling out
any fields, there is no longer shown a perl error message.
---
 C4/Biblio.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 52119ea..ac78ae3 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -2077,7 +2077,7 @@ sub TransformHtmlToXml {
         }
         $prevtag = @$tags[$i];
     }
-    $xml .= "</datafield>\n" if @$tags > 0;
+    $xml .= "</datafield>\n" if $xml =~ m/<datafield/;
     if ( C4::Context->preference('marcflavour') eq 'UNIMARC' and !$unimarc_and_100_exist ) {
 
         #     warn "SETTING 100 for $auth_type";
-- 
1.7.5.4


More information about the Patches mailing list