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

stateProvince() function in Query.php produces MySQL errors

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.5
    • Fix Version/s: 3.4.6
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      The following code in Query.php is producing an IN query with unquoted strings for state/province.

      /**

      • where / qill clause for state/province AND country (if present)
        *
      • @return void
      • @access public
        */
        function stateProvince( &$values, $status = null )
        {
        list( $name, $op, $value, $grouping, $wildcard ) = $values;

      if (! is_array( $value ) )

      { // force the state to be an array $value = array( $value ); }

      $stateClause =
      'civicrm_state_province.id IN (' .
      implode( ',', $value ) .
      ')';

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              jerdavis Jeremiah Davis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: