Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Fixed out-of-bounds crash with #date tag #23

Merged
merged 2 commits into from
Jun 21, 2018
Merged

Fixed out-of-bounds crash with #date tag #23

merged 2 commits into from
Jun 21, 2018

Conversation

ezfe
Copy link
Contributor

@ezfe ezfe commented Jun 19, 2018

The #date tag did not properly default the second parameter.

Using #date(someDate) would cause an out-of-bound error on the tag.parameters array, since out-of-bound indexes do not return optionals.

This checks that the parameters array has two elements before trying to get the second parameter.

@tanner0101 tanner0101 added this to the 1.0.2 milestone Jun 21, 2018
@tanner0101 tanner0101 added the bug Something isn't working label Jun 21, 2018
@tanner0101 tanner0101 self-assigned this Jun 21, 2018
@tanner0101 tanner0101 merged commit f7f0fea into vapor:master Jun 21, 2018
@penny-coin
Copy link

Hey @ezfe, you just merged a pull request, have a coin!

You now have 2 coins.

@tanner0101
Copy link
Member

Thanks!

@tanner0101 tanner0101 modified the milestones: 1.0.2, 1.1.0 Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants