Kdyby / Translation

Integration of Symfony/Translation into Nette Framework
https://packagist.org/packages/kdyby/translation
Other
89 stars 84 forks source link

Cast integer message id to string #154

Closed lulco closed 6 years ago

lulco commented 6 years ago

Fix for error when using "Two dimensional" select:

$form = new Nette\Application\UI\Form();
$items = [
    '2017' => [
        '1',
        '2',
    ],
    '2018' => [
        '1',
        '2',
    ],
];
$form->addSelect('test', 'Test', $items);

Error was: "Message id must be a string, integer was given". As you can see, I was trying to use strings as keys for $items array, but PHP uses integer for key always if it is made up of only digits :(