From 7e4648bc1bb36053ace2eece9aeca448f9a897df Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 27 Jan 2021 06:03:25 -0700 Subject: [PATCH] projtool.pl: avoid rare warning message If --no-owner is used and there are no matching users, avoid an undefined variable warning when showing the warning message by using an empty string. Signed-off-by: Kyle J. McKay --- toolbox/projtool.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/toolbox/projtool.pl b/toolbox/projtool.pl index f643168..d7494f2 100755 --- a/toolbox/projtool.pl +++ b/toolbox/projtool.pl @@ -920,6 +920,7 @@ sub cmd_adopt { my @owner_users = (); @owner_users = map {$findowner eq lc($$_[4]) ? $$_[1] : ()} get_all_users if defined($findowner) && $findowner ne ""; + defined($findowner) or $findowner = ""; if (@owner_users <= 1) { $users = \@owner_users; warn "No users found that match owner \"$findowner\"\n" unless @owner_users || $quiet; -- 2.11.4.GIT