Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast integer message id to string #154

Merged
merged 2 commits into from
Aug 20, 2018
Merged

Cast integer message id to string #154

merged 2 commits into from
Aug 20, 2018

Conversation

lulco
Copy link
Contributor

@lulco lulco commented Aug 10, 2018

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 :(

@lulco lulco changed the title Allow integer message id Cast integer message id to string Aug 11, 2018
@enumag enumag merged commit b892e00 into Kdyby:master Aug 20, 2018
@lulco lulco deleted the integer-message branch August 20, 2018 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants