dev/core#117 Replace useage of deprecated each() in MembershpView
authorColeman Watts <coleman@civicrm.org>
Fri, 25 May 2018 17:20:40 +0000 (11:20 -0600)
committerColeman Watts <coleman@civicrm.org>
Fri, 25 May 2018 17:20:40 +0000 (11:20 -0600)
CRM/Member/Form/MembershipView.php

index 75eec53687cf532c5770f4212c72461b35f20a79..9d656c52ddd3b95af5664202235d39e6fe3def46 100644 (file)
@@ -255,8 +255,7 @@ END AS 'relType'
         $relTypeId = explode(CRM_Core_DAO::VALUE_SEPARATOR, $membershipType['relationship_type_id']);
         $relDirection = explode(CRM_Core_DAO::VALUE_SEPARATOR, $membershipType['relationship_direction']);
         foreach ($relTypeId as $rid) {
-          $dir = each($relDirection);
-          $relTypeDir[substr($dir['value'], 0, 1)][] = $rid;
+          $relTypeDir[substr($relDirection[0], 0, 1)][] = $rid;
         }
         // build query in 2 parts with a UNION if necessary
         // _x and _y are replaced with _a and _b first, then vice-versa