Skip to content

Commit

Permalink
Fix for get_language_file issue
Browse files Browse the repository at this point in the history
Fix for get_language_file issue #30
  • Loading branch information
mariuz committed Feb 9, 2023
1 parent f4324de commit 185ddd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,10 @@ function get_customize_languages()
}

// to prevent file not found or case sensitive SO errors
function get_language_file($path = '.' . DIRECTORY_SEPARATOR . 'lang')
{
function get_language_file($path) {
if ($path == null) {
$path = '.' . DIRECTORY_SEPARATOR . 'lang';
}
$fileLang = $path. DIRECTORY_SEPARATOR . (isset($_SESSION['s_cust']['language']) && !empty($_SESSION['s_cust']['language']) && ($_SESSION['s_cust']['language'] != 1) ? $_SESSION['s_cust']['language'] : LANGUAGE).'.inc.php';
if (file_exists($fileLang)){
return $fileLang;
Expand Down

0 comments on commit 185ddd4

Please sign in to comment.