Fixes error in repo
1/1 FatalErrorException in ServerRepository.php line 404: 'continue' not in the 'loop' or 'switch' context
This commit is contained in:
parent
6e0c5d16af
commit
0d6994e90f
1 changed files with 7 additions and 9 deletions
|
@ -400,10 +400,7 @@ class ServerRepository
|
||||||
|
|
||||||
if (isset($data['default'])) {
|
if (isset($data['default'])) {
|
||||||
list($ip, $port) = explode(':', $data['default']);
|
list($ip, $port) = explode(':', $data['default']);
|
||||||
if ($ip === $server->ip && $port === $server->port) {
|
if ($ip !== $server->ip || $port !== $server->port) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$allocation = Models\Allocation::where('ip', $ip)->where('port', $port)->where('assigned_to', $server->id)->get();
|
$allocation = Models\Allocation::where('ip', $ip)->where('port', $port)->where('assigned_to', $server->id)->get();
|
||||||
if (!$allocation) {
|
if (!$allocation) {
|
||||||
throw new DisplayException('The assigned default connection (' . $ip . ':' . $prot . ') is not allocated to this server.');
|
throw new DisplayException('The assigned default connection (' . $ip . ':' . $prot . ') is not allocated to this server.');
|
||||||
|
@ -412,6 +409,7 @@ class ServerRepository
|
||||||
$server->ip = $ip;
|
$server->ip = $ip;
|
||||||
$server->port = $port;
|
$server->port = $port;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove Assignments
|
// Remove Assignments
|
||||||
if (isset($data['remove_additional'])) {
|
if (isset($data['remove_additional'])) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue