From ab285ca850f4ee2c7ea5bcb50039bdffe89a537c Mon Sep 17 00:00:00 2001 From: matteo Date: Fri, 4 Jul 2014 01:01:56 +0300 Subject: fixed warning about uninitialized value in string --- lib/AdminPanel/Module/Proxy.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/AdminPanel') diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm index c801106..afe7736 100644 --- a/lib/AdminPanel/Module/Proxy.pm +++ b/lib/AdminPanel/Module/Proxy.pm @@ -186,8 +186,15 @@ sub _manageProxyDialog { my $label_width = 25; my $inputfield_width = 45; # getVarsFromSh returns an empty hash if no vars are defined + # possible alternatives: + # . Config::Auto::parse my $proxy_curr_settings = { getVarsFromSh('/etc/profile.d/proxy.sh') }; - my $httpsProxyEqualToHttpProxy = 1 if(($proxy_curr_settings->{http_proxy} eq $proxy_curr_settings->{https_proxy})&&($proxy_curr_settings->{http_proxy} ne "")); + my $httpsProxyEqualToHttpProxy = 0; + if((defined($proxy_curr_settings->{http_proxy}) && defined($proxy_curr_settings->{https_proxy}))&& + (($proxy_curr_settings->{http_proxy} eq $proxy_curr_settings->{https_proxy}) && + ($proxy_curr_settings->{http_proxy} ne ""))){ + $httpsProxyEqualToHttpProxy = 1; + } # # @layout -- cgit v1.2.1