6699 Add not-empty check for warnings from load_sql in Installer

Eliminates fake warnings "Something is wrong on line 530".

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Marcel de Rooy 2011-08-10 15:23:07 +02:00 committed by Paul Poulain
parent 6980d82991
commit 7bbc358067
1 changed files with 4 additions and 2 deletions

View 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;
}