porkbun: Simplify array length check
This commit is contained in:
parent
16b15ea089
commit
0c31681d35
1 changed files with 2 additions and 4 deletions
|
@ -6821,10 +6821,8 @@ sub nic_porkbun_update {
|
||||||
}
|
}
|
||||||
my $records = $response->{records};
|
my $records = $response->{records};
|
||||||
if (ref($records) eq 'ARRAY' && defined $records->[0]->{'id'}) {
|
if (ref($records) eq 'ARRAY' && defined $records->[0]->{'id'}) {
|
||||||
my $count = scalar(@{$records});
|
warning("updating %s: There are multiple applicable records. Only first record is used. Overwrite all with the same content.")
|
||||||
if ($count > 1) {
|
if @$records > 1;
|
||||||
warning("updating %s: There are multiple applicable records. Only first record is used. Overwrite all with the same content.");
|
|
||||||
}
|
|
||||||
my $current_content = $records->[0]->{'content'};
|
my $current_content = $records->[0]->{'content'};
|
||||||
if ($current_content eq $ip) {
|
if ($current_content eq $ip) {
|
||||||
$config{$h}{"status-ipv$ipv"} = "good";
|
$config{$h}{"status-ipv$ipv"} = "good";
|
||||||
|
|
Loading…
Reference in a new issue