Fix incorrect message for invalid states

This commit is contained in:
Johannes Meyer 2023-06-22 09:57:40 +02:00
parent 7c6c793ac3
commit 648cdd7ef4
2 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ class Host extends MonitoredObject
$text = $translate ? mt('monitoring', 'PENDING') : 'pending';
break;
default:
throw new InvalidArgumentException('Invalid host state \'%s\'', $state);
throw new InvalidArgumentException(sprintf('Invalid host state \'%s\'', $state));
}
return $text;
}

View File

@ -206,7 +206,7 @@ class Service extends MonitoredObject
$text = $translate ? mt('monitoring', 'PENDING') : 'pending';
break;
default:
throw new InvalidArgumentException('Invalid service state \'%s\'', $state);
throw new InvalidArgumentException(sprintf('Invalid service state \'%s\'', $state));
}
return $text;
}