diff options
author | matteo <matteo.pasotti@gmail.com> | 2014-07-04 01:01:56 +0300 |
---|---|---|
committer | matteo <matteo.pasotti@gmail.com> | 2014-07-04 01:01:56 +0300 |
commit | ab285ca850f4ee2c7ea5bcb50039bdffe89a537c (patch) | |
tree | 67236821cf80c5bb536fa3f897e7544aaac0b31a /lib/AdminPanel/Module/Proxy.pm | |
parent | ac042acd86ec3193d608e42a1dc5f71f585de7dd (diff) | |
download | manatools-ab285ca850f4ee2c7ea5bcb50039bdffe89a537c.tar manatools-ab285ca850f4ee2c7ea5bcb50039bdffe89a537c.tar.gz manatools-ab285ca850f4ee2c7ea5bcb50039bdffe89a537c.tar.bz2 manatools-ab285ca850f4ee2c7ea5bcb50039bdffe89a537c.tar.xz manatools-ab285ca850f4ee2c7ea5bcb50039bdffe89a537c.zip |
fixed warning about uninitialized value in string
Diffstat (limited to 'lib/AdminPanel/Module/Proxy.pm')
-rw-r--r-- | lib/AdminPanel/Module/Proxy.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm index c8011065..afe77361 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 |