|
@@ -108,7 +108,7 @@ function testReg(): string {
|
|
|
'ns' => 'ns1.servnest.invalid.',
|
|
|
]);
|
|
|
$results = kdig(name: $domain, type: 'NS', server: CONF['reg']['address']);
|
|
|
- if ($results['authorityRRs'][0]['rdataNS'] !== 'ns1.servnest.invalid.')
|
|
|
+ if (($results['authorityRRs'][0]['rdataNS'] ?? NULL) !== 'ns1.servnest.invalid.')
|
|
|
exit('Error: /reg/ns: NS record not set' . LF);
|
|
|
|
|
|
curlTest('/reg/ns', [
|
|
@@ -189,9 +189,9 @@ function testNs(string $domain): void {
|
|
|
'value' => 'letsencrypt.org',
|
|
|
]);
|
|
|
$results = kdig(name: $domain, type: 'CAA', server: CONF['reg']['address']);
|
|
|
- if ($results['answerRRs'][0]['TTL'] !== 7200)
|
|
|
+ if (($results['answerRRs'][0]['TTL'] ?? NULL) !== 7200)
|
|
|
exit('Error: /ns/caa: wrong TTL' . LF);
|
|
|
- if ($results['answerRRs'][0]['rdataCAA'] !== '0 issue "letsencrypt.org" ')
|
|
|
+ if (($results['answerRRs'][0]['rdataCAA'] ?? NULL) !== '0 issue "letsencrypt.org" ')
|
|
|
exit('Error: /ns/caa: CAA record not set' . LF);
|
|
|
|
|
|
curlTest('/ns/edit', [
|
|
@@ -200,7 +200,7 @@ function testNs(string $domain): void {
|
|
|
. '@ 86400 NS ' . CONF['ns']['servers'][0] . "\r\n",
|
|
|
]);
|
|
|
$results = kdig(name: 'aaaa.' . $domain, type: 'AAAA', server: CONF['reg']['address']);
|
|
|
- if ($results['answerRRs'][0]['rdataAAAA'] !== CONF['ht']['ipv6_address'])
|
|
|
+ if (($results['answerRRs'][0]['rdataAAAA'] ?? NULL) !== CONF['ht']['ipv6_address'])
|
|
|
exit('Error: /ns/edit: AAAA record not set' . LF);
|
|
|
}
|
|
|
|