fixed bug in function __()

This commit is contained in:
alejandro-campos 2018-11-28 12:32:19 +01:00
parent ad743d332e
commit 9006a47650
1 changed files with 4 additions and 3 deletions

View File

@ -375,8 +375,8 @@ function __ ($string /*, variable arguments */) {
global $config;
static $extensions_cache = array();
if( !isset($config["id_user"]) && count($extensions_cache) > 0 ) {
if (array_key_exists($config["id_user"], $extensions_cache)) {
if( isset($config["id_user"]) ) {
if ( count($extensions_cache) > 0 && array_key_exists($config["id_user"], $extensions_cache)) {
$extensions = $extensions_cache[$config["id_user"]];
}
else {
@ -385,8 +385,9 @@ function __ ($string /*, variable arguments */) {
}
}
else{
$extension =null;
$extensions=null;
}
if (empty($extensions))
$extensions = array();