From a0f6b55d280a098ab56cab2596fc49a044ebfd1c Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Mon, 25 Jun 2018 13:30:14 +0200 Subject: [PATCH] btrbk: fix regression: undefined array reference when no received_uuid present fixes #239 (@ian-kelling) --- btrbk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/btrbk b/btrbk index 8fccfe7..f4a76c1 100755 --- a/btrbk +++ b/btrbk @@ -2878,10 +2878,10 @@ sub _receive_target_nodes($$) # match uuid/received_uuid combinations my @match; - push(@match, @{ $received_uuid_hash->{$uuid} // [] }); # match src.uuid == target.received_uuid + push(@match, @{ $received_uuid_hash->{$uuid} // [] }); # match src.uuid == target.received_uuid if($received_uuid) { - push(@match, $uuid_hash->{$received_uuid} ); # match src.received_uuid == target.uuid - push(@match, @{ $received_uuid_hash->{$received_uuid} }); # match src.received_uuid == target.received_uuid + push(@match, $uuid_hash->{$received_uuid} ); # match src.received_uuid == target.uuid + push(@match, @{ $received_uuid_hash->{$received_uuid} // [] }); # match src.received_uuid == target.received_uuid } @ret = grep($_->{readonly}, @match);