fix bug in create host in dhcp
ogdhcp/pipeline/head This commit looks good Details

main
Luis Gerardo Romero Garcia 2025-06-05 11:04:03 +02:00
parent 602ac1613c
commit 731955a183
1 changed files with 2 additions and 3 deletions

View File

@ -1383,7 +1383,7 @@ public function addDhcpHost(Request $request, $subnetId): JsonResponse
$macAddress = htmlspecialchars($input->macAddress);
$address = htmlspecialchars($input->address);
// $bootFileName= htmlspecialchars($input->bootFileName);
$bootFileName = isset($input->bootFileName) ? htmlspecialchars($input->bootFileName) : null;
$bootFileName = isset($input->bootFileName) ? htmlspecialchars($input->bootFileName) : null;
} catch (Exception $e) {
$errorText = $e->getMessage();
$this->logger->error(json_encode([
@ -1408,8 +1408,7 @@ public function addDhcpHost(Request $request, $subnetId): JsonResponse
$newHost = [
"hostname" => $host,
"hw-address" => $macAddress,
"ip-address" => $address,
"boot-file-name" => $bootFileName
"ip-address" => $address
];
$subnetFound = false;