Fix functions __ and __get having invalid parameter types
This commit is contained in:
parent
06b843353a
commit
b736b13286
|
@ -65,14 +65,14 @@ if(!isset($_SESSION["userlanguageid"])) {
|
||||||
/**
|
/**
|
||||||
* Shortcut to translate and output the result
|
* Shortcut to translate and output the result
|
||||||
*/
|
*/
|
||||||
function __(string $identifier, array $args = []) {
|
function __(string $identifier, $args = [], bool $nullOnError = false) {
|
||||||
echo __get($identifier, $args);
|
echo __get($identifier, $args, $nullOnError);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut to translate and return the result
|
* Shortcut to translate and return the result
|
||||||
*/
|
*/
|
||||||
function __get(string $identifier, array $args = []) {
|
function __get(string $identifier, $args = [], bool $nullOnError = false) {
|
||||||
try {
|
try {
|
||||||
return LanguageUtils::i()->translate($identifier, $args);
|
return LanguageUtils::i()->translate($identifier, $args);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue