Be more permissive about null values passed to lang() and Context::getLang()

This commit is contained in:
Kijin Sung 2023-12-18 21:19:33 +09:00
parent 14449dff9d
commit 6e2bab02cc
2 changed files with 4 additions and 4 deletions

View file

@ -856,7 +856,7 @@ class Context
$GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
return $GLOBALS['lang']->get($code);
return $code ? $GLOBALS['lang']->get((string)$code) : (string)$code;
}
/**