bug: fix editing device no longer attempts renaming if name not changed #5123 (#5125)

This commit is contained in:
Neil Lathwood
2016-12-08 04:16:05 +00:00
committed by Tony Murray
parent a984c67f98
commit f0fefcfe4f

View File

@@ -40,8 +40,7 @@ if ($_POST['editing']) {
} else {
$update_message = "Device record update error.";
}
if ($_POST['hostname'] !== '' && $_POST['hostname'] !== $device['hostname']) {
if (isset($_POST['hostname']) && $_POST['hostname'] !== '' && $_POST['hostname'] !== $device['hostname']) {
if (is_admin()) {
$result = renamehost($device['device_id'], $_POST['hostname'], 'webui');
if ($result == "") {