Skip to content

Commit

Permalink
Bugfix for ELN if language is != en,de
Browse files Browse the repository at this point in the history
  • Loading branch information
fr committed Feb 9, 2023
1 parent b355180 commit f2f7fd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib_global_funcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ function s_rnd($key) {
global $lang,$localizedString;

$strArray=$localizedString[$lang][$key] ?? null;
if (is_array($strArray)) {
return $strArray[random_int(0,count($strArray)-1)];
$sz=arrCount($strArray);
if ($sz) {
return $strArray[random_int(0,$sz-1)];
}
}

Expand Down

0 comments on commit f2f7fd4

Please sign in to comment.