File tree Expand file tree Collapse file tree
public_html/lib/module/rpcn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,13 +152,16 @@ private function processStats(): void {
152152 $ comm_id_player_count = 0 ;
153153
154154 // First try psn_games (comm_id)
155- if (isset ($ data ['psn_games ' ][$ comm_id ])) {
156- $ value = $ data ['psn_games ' ][$ comm_id ];
157-
158- if (is_array ($ value ) && isset ($ value [0 ])) {
159- $ comm_id_player_count += (int ) $ value [0 ];
160- } elseif (is_int ($ value )) {
161- $ comm_id_player_count += $ value ;
155+ $ normalized_entry_id = $ this ->normalize_id ($ comm_id );
156+ if (isset ($ data ['psn_games ' ]) && is_array ($ data ['psn_games ' ])) {
157+ foreach ($ data ['psn_games ' ] as $ api_title_id => $ value ) {
158+ if ($ this ->normalize_id ($ api_title_id ) === $ normalized_entry_id ) {
159+ if (is_array ($ value ) && isset ($ value [0 ])) {
160+ $ comm_id_player_count += (int ) $ value [0 ];
161+ } elseif (is_int ($ value )) {
162+ $ comm_id_player_count += $ value ;
163+ }
164+ }
162165 }
163166 }
164167
You can’t perform that action at this time.
0 commit comments