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

Parse error when submiting Constituent Information with drupal 4.5.3

    Details

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

      Description

      I just installed CiviCRM, Running civicrm-Drupal-php4-v1.2-rev3721 with Drupal 4.5.3 when submitting information for user/1 I get the following error message. also does the same when adding an individual.

      I don't know what the problem is, help would be appreciated

      *
      Parse error*: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/*/***/modules/civicrm/CRM/Utils/Geocode/ZipTable.php on line 71

      From civicrm/CRM/Utils/Geocode/ZipTable.php

      function format( &$values ) {
      // we need a valid zipcode and country, else we ignore
      if ( ! CRM_Utils_Array::value( 'postal_code', $values ) &&
      ! CRM_Utils_Array::value( 'country' , $values ) &&
      $values['country'] != 'United States' )

      { return false; }

      //** line 71 below **//

      if ( empty( trim( $values['postal_code'] ) ) )

      { return false; }

      $query = 'SELECT latitude, longitude FROM zipcodes WHERE zip = ' .

      CRM_Utils_Type::esape( $values['postal_code'], 'String' );

      $dao =& CRM_Core_DAO::executeQuery( $query );

      if ( $dao->fetch( ) )

      { $values['geo_code_1'] = $dao->latitude ; $values['geo_code_2'] = $dao->longitude; return true; }

      return false;

      }

      }

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              Anonymous
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: