Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3393

Abbreviations can be numeric in state province table, avoid using is_numeric / constrain the range

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      Countries like thailand have numeric abbreviation. however all abbreviations are less than 1000. so we can do a crude hack of:

      if is_numeric( $state_province_id ) && (int ) $state_province_id >= 1000

      to get around this. Its a bit ugly, but will work in a large number of cases where we die with a fatal message

        Attachments

          Activity

            People

            • Assignee:
              shot Piotr Szotkowski
              Reporter:
              lobo Donald A. Lobo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: