github vapor/vapor 4.27.2
Fix decodeNil in URLEncodedFormDecoder's single value decoder

latest releases: 4.94.1, 4.94.0, 4.93.2...
3 years ago
This patch was authored and released by @tanner0101.

Fixes an issue causing URLEncodedFormDecoder's single value decoder to not detect nil correctly (#2463, fixes #2460).

This could result in req.query.get throwing an error instead of returning nil if the key was missing.

// This code will now return `nil` instead of throwing if the key is missing.
// It will still throw an error if the value cannot be converted to an Int. 
let page = try req.query.get(Int?.self, at: "page")

Don't miss a new vapor release

NewReleases is sending notifications on new releases.