From 913cbd14c42717b8693c147e49041280f4d2e7a8 Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Sun, 18 Jul 2021 12:23:17 +0200 Subject: [PATCH] Set default for LangDir When Sccp_manager construct is called by the installer, this variable is not set. The installer sets it later --- Sccp_manager.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 7009fe8..caa8fe3 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -754,8 +754,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { private function findInstLangs() { //locales and languages are installed in the tftp_lang_path $result = array(); - // TODO: Installer comes here so need to set default / ? - $langDir = $this->sccppath["tftp_lang_path"]; + $langDir = '/'; //set default for when called by installer on virgin system + if (!empty($this->sccppath["tftp_lang_path"])) { + $langDir = $this->sccppath["tftp_lang_path"]; + } $localeJar = 'be-sccp.jar'; // This jar should exist if the locale is populated $langArr = $this->extconfigs->getExtConfig('sccp_lang'); $localeArray = array_combine(array_keys($langArr),array_column($langArr, 'locale'));