From f5b369a7ef1c1344aafdfa26fda09526e121763f Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 29 Jun 2024 02:36:44 -0400 Subject: [PATCH] Fix undef warning when encountering an unset but required var This fixes a bug probably introduced in commit b8a0a264413255891e3699a3414188a952c528cd --- ddclient.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 716682d..082cc8c 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2046,7 +2046,8 @@ sub init_config { my $ovalue = $config{$h}{$k} // $def->{'default'}; my $value = check_value($ovalue, $def); if ($def->{'required'} && !defined $value) { - warning("skipping host: %s: '%s=%s' is an invalid %s.", $h, $k, $ovalue, $def->{'type'}); + $ovalue //= '(not set)'; + warning("skipping host $h: invalid $def->{type} variable value '$k=$ovalue'"); delete $config{$h}; next HOST; }