Ticket #2272 (closed enhancement: fixed)
tg.url() is too laxist with argument types
| Reported by: | pitrou | Owned by: | rick446 |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1b2 |
| Component: | TurboGears | Version: | 2.0b7 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
If you inadvertently pass None as a query parameter value to tg.url (e.g. tg.url('myaction', myparam=None)), you will get a value of u"None" in the parameter when the link is clicked, which can then break stuff in your application.
This is PHP-like behaviour, TurboGears should instead enforce stricter type checking to avoid annoying bugs. (there is a reason people hate PHP :-))
Change History
Note: See
TracTickets for help on using
tickets.