Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2022-06-16 08:57:15 +0300
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2022-06-16 08:57:15 +0300
commit96944b40c653d838153d40416f3ed9d11bfdb945 (patch)
tree270a0efd04d60085b023b82e89e0df069a9131b1
parent1331225eb1751d0829e3e08497218d1c18020ad5 (diff)
parentf21f77257fc9cad1362bb6d6925db1b37448dd8f (diff)
A.F....... [ZBX-20233] fixed handling of empty configuration parameters $ZBX_SERVER and $ZBX_SERVER_PORT the same as if they were not defined
* commit 'f21f77257fc9cad1362bb6d6925db1b37448dd8f': A.F....... [ZBX-20233] fixed handling of empty configuration parameters $ZBX_SERVER and $ZBX_SERVER_PORT the same as if they were not defined
-rw-r--r--ChangeLog.d/bugfix/ZBX-202331
-rw-r--r--ui/app/partials/layout.htmlpage.header.php2
-rw-r--r--ui/include/classes/core/CConfigFile.php4
-rw-r--r--ui/include/config.inc.php2
4 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog.d/bugfix/ZBX-20233 b/ChangeLog.d/bugfix/ZBX-20233
new file mode 100644
index 00000000000..c0700477715
--- /dev/null
+++ b/ChangeLog.d/bugfix/ZBX-20233
@@ -0,0 +1 @@
+A.F....... [ZBX-20233] fixed handling of empty configuration parameters $ZBX_SERVER and $ZBX_SERVER_PORT the same as if they were not defined (Sasha)
diff --git a/ui/app/partials/layout.htmlpage.header.php b/ui/app/partials/layout.htmlpage.header.php
index 621bd06563e..5a343ccc248 100644
--- a/ui/app/partials/layout.htmlpage.header.php
+++ b/ui/app/partials/layout.htmlpage.header.php
@@ -24,7 +24,7 @@
* @var array $data
*/
-global $DB, $ZBX_SERVER, $ZBX_SERVER_NAME, $ZBX_SERVER_PORT;
+global $DB, $ZBX_SERVER_NAME;
$theme = ZBX_DEFAULT_THEME;
$scripts = $data['javascript']['files'];
diff --git a/ui/include/classes/core/CConfigFile.php b/ui/include/classes/core/CConfigFile.php
index b29a3813d7a..2997ac348b2 100644
--- a/ui/include/classes/core/CConfigFile.php
+++ b/ui/include/classes/core/CConfigFile.php
@@ -154,11 +154,11 @@ class CConfigFile {
$this->config['DB']['VAULT_TOKEN'] = $DB['VAULT_TOKEN'];
}
- if (isset($ZBX_SERVER)) {
+ if (isset($ZBX_SERVER) && $ZBX_SERVER !== '') {
$this->config['ZBX_SERVER'] = $ZBX_SERVER;
}
- if (isset($ZBX_SERVER_PORT)) {
+ if (isset($ZBX_SERVER_PORT) && $ZBX_SERVER_PORT !== '') {
$this->config['ZBX_SERVER_PORT'] = $ZBX_SERVER_PORT;
}
diff --git a/ui/include/config.inc.php b/ui/include/config.inc.php
index 22a01953af4..6b77e16cbc3 100644
--- a/ui/include/config.inc.php
+++ b/ui/include/config.inc.php
@@ -70,7 +70,7 @@ catch (Exception $e) {
CProfiler::getInstance()->start();
-global $ZBX_SERVER, $ZBX_SERVER_PORT, $page;
+global $page;
$page = [
'title' => null,