CRM-16288
[civicrm-core.git] / CRM / Contact / BAO / ProximityQuery.php
index 5bf8209940c2f36ef38d738af21ad39f1e1a75de..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.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @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'];
     }
@@ -365,6 +366,8 @@ ACOS(
   /**
    * @param array $input
    * retun void
+   *
+   * @return null
    */
   public static function fixInputParams(&$input) {
     foreach ($input as $param) {
@@ -391,4 +394,5 @@ ACOS(
       }
     }
   }
+
 }