From 107a65404cc2f1ae244c0d3056eb91d1ab1aa5b9 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 21 Mar 2019 15:09:24 +0000 Subject: [PATCH] even better fix for dclone _auth --- lib/App/Netdisco/Util/DeviceAuth.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/App/Netdisco/Util/DeviceAuth.pm b/lib/App/Netdisco/Util/DeviceAuth.pm index 5e87fdd7..80ed8d8a 100644 --- a/lib/App/Netdisco/Util/DeviceAuth.pm +++ b/lib/App/Netdisco/Util/DeviceAuth.pm @@ -34,8 +34,8 @@ config changes over time. Returns a list which can replace C. =cut sub fixup_device_auth { - my $da = dclone setting('device_auth'); - my $sa = dclone setting('snmp_auth'); + my $da = dclone (setting('device_auth') || []); + my $sa = dclone (setting('snmp_auth') || []); die "error: both snmp_auth and device_auth are defined! use only device_auth.\n" if scalar @$da and scalar @$sa;