6699 Add not-empty check for warnings from load_sql in Installer
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 10 Aug 2011 13:23:07 +0000 (15:23 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Sat, 3 Dec 2011 06:41:30 +0000 (07:41 +0100)
Eliminates fake warnings "Something is wrong on line 530".

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Installer.pm

index 1c177b9..ae55296 100644 (file)
@@ -529,8 +529,10 @@ sub load_sql {
         # report the import a failure although it really succeded -fbcit
     }
 #   errors thrown while loading installer data should be logged
-    warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
-    warn $error;
+    if($error) {
+      warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
+      warn $error;
+    }
     return $error;
 }