Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8114

Numeric type Custom Profile Fields with no default value return zero

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.6
    • 3.0.4
    • Other
    • None
    • PHP Environment: 5.2.8
      Database: 5.0.67

      I've created a numeric field, 4 characters long, accepting values from 1950 to 2008. I left blank the default value in order to keep it hidden if someone has not filled it in. I noticed that in the registration form and in the UCP the field appeared with a zero as a default value and what's more, it was accepting zero as a valid number. Even when I set the default field value to zero, phpBB continued to accept 0 as a logical value. I changed the default value to -1 so that a user will have to type it in or erase it. But even in this scenario 0 was an acceptable value.

      I believe here we face three bugs:
      [list: 3r5sk7gu]

      • The default numeric value can't be blank
      • The default numeric value can be out of the range and improper length
      • 0 (zero) is always an acceptable value

            ToonArmy Chris Smith
            intelx86 intelx86
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: