CRM-16288
[civicrm-core.git] / CRM / Contact / BAO / ProximityQuery.php
index ef20040094478c8cc06b72233f6294d7f5d85ccc..e4d56c47a7aea54b2d722a984f04433e8d31b4df 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -98,6 +98,7 @@ class CRM_Contact_BAO_ProximityQuery {
    * @param float $longitude
    * @param float $latitude
    * @param float $height
+   *
    * @return array
    */
   public static function earthXYZ($longitude, $latitude, $height = 0) {
@@ -308,7 +309,7 @@ ACOS(
       }
     }
 
-    if (isset($proximityAddress['country_id'])) {
+    if (!empty($proximityAddress['country_id'])) {
       $proximityAddress['country'] = CRM_Core_PseudoConstant::country($proximityAddress['country_id']);
       $qill[] = $proximityAddress['country'];
     }