Skip to content

Commit 21b9b5b

Browse files
committed
Fix copilot PR review.
1 parent 59d2066 commit 21b9b5b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • modules/registrars/openprovider/OpenProvider/API

modules/registrars/openprovider/OpenProvider/API/APITools.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ class APITools
1414
public static function createNameserversArray($params, $apiHelper = null)
1515
{
1616
$nameServers = array();
17+
$domainFqdn = strtolower($params['sld'] . '.' . $params['tld']);
1718

18-
//can be used to hard-code a nameserver overwrite when using the DNS management addon
19+
//can be used to hard-code a nameserver overwrite when using the DNS management addon
1920
// if($params['dnsmanagement'] == true)
2021
// {
2122
// $params['ns1'] = 'ns1.openprovider.nl';
@@ -38,7 +39,6 @@ public static function createNameserversArray($params, $apiHelper = null)
3839

3940
// Glue records (NS is a child of the domain) require an IP.
4041
// External nameservers must be accepted as-is without IP lookup.
41-
$domainFqdn = strtolower($params['sld'] . '.' . $params['tld']);
4242
$isGlue = str_ends_with(strtolower($nsName), '.' . $domainFqdn);
4343

4444
if (!$isGlue) {
@@ -64,7 +64,7 @@ public static function createNameserversArray($params, $apiHelper = null)
6464
$nsIp = "";
6565
throw new \Exception(
6666
"Could not resolve IP for glue record nameserver '{$nsName}'. "
67-
. "Please register it in OpenProvider before initiating the transfer."
67+
. "Please register it in OpenProvider before continuing."
6868
);
6969
}
7070
}
@@ -97,7 +97,6 @@ public static function createNameserversArray($params, $apiHelper = null)
9797

9898
// Glue records (NS is a child of the domain) require an IP.
9999
// External nameservers must be accepted as-is without IP lookup.
100-
$domainFqdn = strtolower($params['sld'] . '.' . $params['tld']);
101100
$isGlue = str_ends_with(strtolower($nsName), '.' . $domainFqdn);
102101

103102
if (!$isGlue) {
@@ -140,7 +139,7 @@ public static function createNameserversArray($params, $apiHelper = null)
140139
$names = implode(', ', $invalidGlueNameServers);
141140
throw new \Exception(
142141
"Could not resolve IP for glue record nameserver(s): {$names}. "
143-
. "Please register them in OpenProvider before initiating the transfer."
142+
. "Please register them in OpenProvider before continuing."
144143
);
145144
}
146145
throw new \Exception('You must provide at least 2 nameservers.');

0 commit comments

Comments
 (0)