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

Alphanumeric select fields with integer-like keys get turned into INTs

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When building a select field in civicrm, there is a value and a label. These get put into an array like:

      $options[$value] = $label;

      Eventhough this is an alphanumeric field, when you put something that looks like an integer (003) for instance into an array as an index, php converts it to its integer value automatically.

      Patch is attached. Not sure if I'm checking for all the right data types. Please review.

        Attachments

          Activity

            People

            • Assignee:
              sunil Sunil Pawar
              Reporter:
              jacobsingh Jacob Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: