From 0d6994e90f9e4f9ee52999b5aabf80c7d7b29845 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 8 Jan 2016 14:54:55 -0500 Subject: [PATCH] Fixes error in repo 1/1 FatalErrorException in ServerRepository.php line 404: 'continue' not in the 'loop' or 'switch' context --- app/Repositories/ServerRepository.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 225def89a..07f703feb 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -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