1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00

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:
Dane Everitt 2016-01-08 14:54:55 -05:00
parent 6e0c5d16af
commit 0d6994e90f

View File

@ -400,17 +400,15 @@ class ServerRepository
if (isset($data['default'])) {
list($ip, $port) = explode(':', $data['default']);
if ($ip === $server->ip && $port === $server->port) {
continue;
}
if ($ip !== $server->ip || $port !== $server->port) {
$allocation = Models\Allocation::where('ip', $ip)->where('port', $port)->where('assigned_to', $server->id)->get();
if (!$allocation) {
throw new DisplayException('The assigned default connection (' . $ip . ':' . $prot . ') is not allocated to this server.');
}
$allocation = Models\Allocation::where('ip', $ip)->where('port', $port)->where('assigned_to', $server->id)->get();
if (!$allocation) {
throw new DisplayException('The assigned default connection (' . $ip . ':' . $prot . ') is not allocated to this server.');
$server->ip = $ip;
$server->port = $port;
}
$server->ip = $ip;
$server->port = $port;
}
// Remove Assignments