Fix functions __ and __get having invalid parameter types

This commit is contained in:
Wruczek 2020-10-08 06:28:26 +02:00
parent 06b843353a
commit b736b13286
1 changed files with 3 additions and 3 deletions

View File

@ -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) {