mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 16:14:21 +02:00
add wantarray or string
This commit is contained in:
parent
30c63a59d7
commit
b812a6ff50
@ -42,8 +42,9 @@ sub new {
|
|||||||
sub get_basic_credentials {
|
sub get_basic_credentials {
|
||||||
my($self, $realm, $uri, $proxy) = @_;
|
my($self, $realm, $uri, $proxy) = @_;
|
||||||
return if $proxy;
|
return if $proxy;
|
||||||
return $self->{username}, $self->{password} if $self->{credentials};
|
return $self->{username}, $self->{password} if $self->{credentials} and wantarray;
|
||||||
return undef, undef;
|
return $self->{username}.":".$self->{password} if $self->{credentials};
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user