diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php
index 7eebb7f5b00daf638bf30c87da8e3440d9b0fffc..523671c0c7d251eac5fdf005784933a5924c796a 100644
--- a/interface/web/admin/server_config_edit.php
+++ b/interface/web/admin/server_config_edit.php
@@ -83,8 +83,10 @@ class page_action extends tform_actions {
 
 	function onShowEnd() {
 		global $app;
-
-		$app->tpl->setVar('server_name', $app->functions->htmlentities($app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id)['server_name']));
+		
+		$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id);
+		$app->tpl->setVar('server_name', $app->functions->htmlentities($tmp['server_name']));
+		unset($tmp);
 
 		parent::onShowEnd();
 	}