Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2272 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

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:


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

comment:1 Changed 10 years ago by mramm

  • Type changed from defect to enhancement

comment:2 Changed 10 years ago by mramm

  • Milestone changed from 2.0rc1 to 2.1

comment:3 Changed 9 years ago by percious

  • Milestone changed from 2.1 to 2.1b2

comment:4 Changed 9 years ago by rick446

  • Status changed from new to assigned
  • Owner set to rick446

comment:5 Changed 9 years ago by rick446

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in 1fe79de30eca

Note: See TracTickets for help on using tickets.