Fix service identification

This commit is contained in:
Ely Deckers 2022-02-20 22:14:25 +01:00
parent 6e7b1bb56b
commit e47eb9f53a
1 changed files with 1 additions and 1 deletions

View File

@ -739,7 +739,7 @@ class Commands
$maybe_service = Util::array_first(PfEnv::get_services(), function ($service) use ($sanitized_name) {
foreach (["id", "zone"] as $key) {
if (!empty($service[$key])) {
if (array_key_exists($key, $service)) {
return sprintf("%s%s", $service["name"], $service[$key]) == $sanitized_name;
}
}