More middleware tests

This commit is contained in:
Dane Everitt
2017-11-01 20:45:43 -05:00
parent d844a36167
commit 7b3393aff9
11 changed files with 547 additions and 56 deletions

View File

@@ -50,7 +50,7 @@ class SubuserBelongsToServer
$hash = $request->route()->parameter('subuser', 0);
$subuser = $this->repository->find($this->hashids->decodeFirst($hash, 0));
if (! $subuser || $subuser->server_id !== $server->id) {
if (is_null($subuser) || $subuser->server_id !== $server->id) {
throw new NotFoundHttpException;
}