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

Typo in Google Geocoding make php crash (fix included)

    Details

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

      Description

      Symptoms:

      While running cron:

      PHP Fatal error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]]) in sites/all/modules/civicrm/CRM/Core/Error.php on line 276

      Backtrace:

      [file] => sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php
      [line] => 150
      [function] => fatal
      [class] => CRM_Core_Error
      [type] => ::
      [args] => Array
      (
      [0] => Geocoding failed. Message from Google:
      [1] => SimpleXMLElement Object
      (
      [0] => OVER_QUERY_LIMIT
      )

      )

      Offending code :

      CRM_Core_Error::fatal('Geocoding failed. Message from Google: ', $xml->status);

      The bug :

      The coma should be a dot (see CRM_Core_Error::fatal($message, $code, $email))

      The fix:

      — Google.php.4.2.6 2012-06-13 17:15:02.000000000 -0400
      +++ Google.php 2013-01-02 05:03:49.000000000 -0500
      @@ -147,7 +147,7 @@
      }
      }
      elseif ($xml->status == 'OVER_QUERY_LIMIT')

      { - CRM_Core_Error::fatal('Geocoding failed. Message from Google: ', $xml->status); + CRM_Core_Error::fatal('Geocoding failed. Message from Google: ' . $xml->status); }

      }

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              julienld Julien Larocque-Dupont
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10 minutes
                10m
                Remaining:
                Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified