diff --git a/app/helpers.php b/app/helpers.php index 825d998..fced2fe 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -107,7 +107,7 @@ function our_address(Domain $do=NULL,Address $ao=NULL): Collection|Address|NULL $filter = $our->filter(function($item) use ($do) { return $item->zone->domain_id === $do->id; })->sortBy('role'); // If we are looking for a specific address, and there is only 1 result, return it, otherwise return what we have - if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role < $ao->role; })->sortBy('role'))->count()) + if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role <= $ao->role; })->sortBy('role'))->count()) $filter = $x; return $ao ? $filter->last() : ($do ? $filter : $our);