[SUCS Devel] [Git][sucssite/sucs-site][beta] fix suapi

Imran Hussain imranh at sucs.org
Mon Oct 3 16:34:50 BST 2016


Imran Hussain pushed to branch beta at sucssite / sucs-site


Commits:
6c713711 by Imran Hussain at 2016-10-03T16:36:24+01:00
fix suapi

- - - - -


1 changed file:

- lib/suapiv2.php


Changes:

=====================================
lib/suapiv2.php
=====================================
--- a/lib/suapiv2.php
+++ b/lib/suapiv2.php
@@ -31,8 +31,10 @@ $membership_data = $formated_raw_data["table1"]["table1_Product_Collection"]["ta
 
 // make a new array that just contains *every* member no matter what they bought
 $just_members = array();
-foreach ($membership_data["Detail_Collection"]["Detail"] as $member) {
-    array_push($just_members, $member["@attributes"]);
+foreach ($membership_data as $typeOfMember) {
+	foreach ($typeOfMember["Detail_Collection"]["Detail"] as $member) {
+		array_push($just_members, $member["@attributes"]);
+	}
 }
 
 /* You can now use $just_members to probe member detials. It's an array of arrays which each contain:



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/6c713711f42ee4fa03c891e1369a6eede8b83bdc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20161003/0db4bd4e/attachment-0001.html>


More information about the Devel mailing list