From 167aef8df22d2944fcf566301bc2842733f9a6c8 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 10 Sep 2019 16:44:14 -0600 Subject: [PATCH] Dashboard: Fix Regstration count (better :) --- app/registrations/resources/classes/registrations.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/registrations/resources/classes/registrations.php b/app/registrations/resources/classes/registrations.php index 79568e591c..2660719d75 100644 --- a/app/registrations/resources/classes/registrations.php +++ b/app/registrations/resources/classes/registrations.php @@ -183,7 +183,12 @@ if (!class_exists('registrations')) { exit; } $array = json_decode(json_encode($xml), true); - $count = $count + @sizeof($array['registrations']); + if (is_array($array['registrations']['registration'][0])) { + $count = $count + @sizeof($array['registrations']['registration']); + } + else { + $count = $count + @sizeof($array['registrations']); + } } }