Issue Bug Closed

#93346LocalizationUtility::translate throws uncaught exception, if the arguments contains an empty array

Dieter Porth 01/22/21, 11:14 updated 07/19/24, 06:38

Description


$kye = "hallo %s",  
$param=[];
sprintf($kye, ...array_values($param));

The code above throws an exception. This exception is uncaught in LocalizationUtility::translate.

I use something like this often. A meaningful exception woul be nice.

$argList = [];
$webTitle = LocalizationUtility::translate(
    $item['title'],
    'myExtension',
    $argList
);
                                }

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.