[Koha-patches] [PATCH 14/78] (not new_acq related) smallfix to avoid a die in case of an invalid record

paul.poulain at biblibre.com paul.poulain at biblibre.com
Thu May 28 18:32:24 CEST 2009


From: Paul Poulain <paul.poulain at biblibre.com>

---
 misc/cronjobs/build_browser_and_cloud.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc/cronjobs/build_browser_and_cloud.pl b/misc/cronjobs/build_browser_and_cloud.pl
index 263d886..638741b 100755
--- a/misc/cronjobs/build_browser_and_cloud.pl
+++ b/misc/cronjobs/build_browser_and_cloud.pl
@@ -92,7 +92,7 @@ while ((my ($biblionumber)= $sth->fetchrow)) {
 	    next;
     }
     # deal with BROWSER part
-    if ($browser_tag) { 
+    if ($browser_tag && $Koharecord) { 
         foreach my $browsed_field ($Koharecord->subfield($browser_tag,$browser_subfield)) {
             $browsed_field =~ s/\.//g;
             my $upto = length($browsed_field)<=$max_digits?length($browsed_field):$max_digits;
@@ -103,7 +103,7 @@ while ((my ($biblionumber)= $sth->fetchrow)) {
         }
     }
     #deal with CLOUD part
-    if ($cloud_tag) {
+    if ($cloud_tag && $Koharecord) {
         foreach ($Koharecord->field($cloud_tag)) {
             my $line;
             foreach ($_->subfields()) {
-- 
1.6.0.4




More information about the Koha-patches mailing list