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

This commit is contained in:
Neil Lathwood
2016-12-07 22:16:05 -06:00
committed by Tony Murray
co-authored by Tony Murray
parent a984c67f98
commit f0fefcfe4f
+1 -2
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 == "") {