marsadm: fix annoying perl warning

This commit is contained in:
Thomas Schoebel-Theuer 2016-03-14 07:27:58 +01:00
parent 3c244706a5
commit 79a1d20c69
1 changed files with 1 additions and 1 deletions

View File

@ -2251,7 +2251,7 @@ sub primary_phase0 {
check_todo($cmd, $res, "replay", 1, 0);
# check that no logfile replay errors exist.
my $replay_error = get_link("$mars/resource-$res/actual-$host/replay-code", 2);
if (int($replay_error) < 0) {
if (defined($replay_error) && $replay_error ne "" && int($replay_error) < 0) {
lwarn "Logfile replay / recovery stopped with error code $replay_error.\n";
ldie "Won't switch to avoid unnoticed data loss. You may however do a 'primary --force'.\n" unless $force;
}