From: Marcin Haba Date: Thu, 27 Sep 2018 16:09:06 +0000 (+0200) Subject: baculum: Fix undefined index error on web config wizard page X-Git-Tag: Release-9.2.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11e62a20fd0a42b396796eb5c6ba86f92a96d5c5;p=thirdparty%2Fbacula.git baculum: Fix undefined index error on web config wizard page --- diff --git a/gui/baculum/protected/Web/Class/BaculumWebPage.php b/gui/baculum/protected/Web/Class/BaculumWebPage.php index 868aac6dc..b0a27adc0 100644 --- a/gui/baculum/protected/Web/Class/BaculumWebPage.php +++ b/gui/baculum/protected/Web/Class/BaculumWebPage.php @@ -74,7 +74,7 @@ class BaculumWebPage extends BaculumPage { if (isset($_SESSION['language']) && !empty($_SESSION['language'])) { $language = $_SESSION['language']; } else { - if (key_exists('lang', $this->config['baculum'])) { + if (isset($this->config['baculum']) && key_exists('lang', $this->config['baculum'])) { $language = $this->config['baculum']['lang']; } if (is_null($language)) { diff --git a/gui/baculum/protected/Web/Pages/WebConfigWizard.php b/gui/baculum/protected/Web/Pages/WebConfigWizard.php index fb6517fdc..08f48a62e 100644 --- a/gui/baculum/protected/Web/Pages/WebConfigWizard.php +++ b/gui/baculum/protected/Web/Pages/WebConfigWizard.php @@ -38,7 +38,7 @@ class WebConfigWizard extends BaculumWebPage public function onInit($param) { parent::onInit($param); - $this->Lang->SelectedValue = $_SESSION['language']; + $this->Lang->SelectedValue = $this->getLanguage(); $config = $this->getModule('web_config'); $this->web_config = $config->getConfig(); $this->host_config = $this->getModule('host_config')->getConfig();