Project

General

Profile

Actions

Bug #93346

closed

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

Added by Dieter Porth almost 4 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2021-01-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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
);
                                }

Files

local_history.patch (1.79 KB) local_history.patch Dieter Porth, 2021-01-22 11:11

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #98924: Harden LocalizationUtility with argumentsClosed2022-10-26

Actions
Related to TYPO3 Core - Task #96473: Allow ServerRequestInterface in ext:fluidClosed2022-01-06

Actions
Actions

Also available in: Atom PDF