Bug Report #2952
Validate::digit() should not allow negative integers
| Status: | Closed | Start date: | 06/11/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Core | |||
| Target version: | v3.0.7 | |||
| Resolution: | fixed | Points: |
Description
Validate::digit() checks whether a string consists of digits only (no dots or dashes). However, if you are not enabling UTF-8 compatibility all that happens is an is_int check. (If you pass a string ctype_digit correctly disallows dashes.)
Validate::digit(-5); // TRUE, should be FALSE
Validate::digit('-5'); // FALSE
Associated revisions
Fixed #2952
History
Updated by Geert De Deckere almost 3 years ago
- Status changed from New to Closed
- Resolution set to fixed
Updated by Matt Button almost 3 years ago
Please can you set the status to "needs tests"? This could be a useful candidate
Updated by Jeremy Bush almost 3 years ago
- Status changed from Closed to Needs Test
- Assignee changed from Geert De Deckere to Jeremy Bush
- Resolution deleted (
fixed)
Updated by Jeremy Bush almost 3 years ago
- Status changed from Needs Test to Closed
- Resolution set to fixed
Updated by Jeremy Bush almost 3 years ago
- % Done changed from 0 to 100