Merge pull request #2758 from pratik-joshi/CRM-14278
[civicrm-core.git] / api / v3 / MembershipStatus.php
index 8296daa688c6990a71787ad11e60ec571853c530..b9eb9d116138f0ec6847bf7d03b2f9e3dd79592c 100644 (file)
@@ -2,9 +2,9 @@
 
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -32,7 +32,7 @@
  * @package CiviCRM_APIv3
  * @subpackage API_Membership
  *
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * @version $Id: MembershipStatus.php 30171 2010-10-14 09:11:27Z mover $
  *
  */
@@ -164,7 +164,7 @@ SELECT start_date, end_date, join_date
   $dao = &CRM_Core_DAO::executeQuery($query, $params);
   if ($dao->fetch()) {
     // Take the is_admin column in MembershipStatus into consideration when requested
-    if (! CRM_Utils_Array::value('ignore_admin_only', $membershipParams) ) {
+    if (empty($membershipParams['ignore_admin_only'])) {
       $result = &CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate($dao->start_date, $dao->end_date, $dao->join_date, 'today', TRUE);
     }
     else {
@@ -172,7 +172,7 @@ SELECT start_date, end_date, join_date
     }
 
     //make is error zero only when valid status found.
-    if (CRM_Utils_Array::value('id', $result)) {
+    if (!empty($result['id'])) {
       $result['is_error'] = 0;
     }
   }