Skip to content

Commit 75099c8

Browse files
committed
Fixing steamids calls to make sure they are comma separated.
1 parent f8cd104 commit 75099c8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ php:
88
before_script:
99
- composer install
1010

11-
after_script:
11+
script:
1212
- phpunit --coverage-clover=coverage.clover
1313
- wget https://scrutinizer-ci.com/ocular.phar
1414
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

src/Syntax/SteamApi/Steam/User.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ public function GetPlayerSummaries($steamId = null)
2929
$this->version = 'v0002';
3030

3131
if ($steamId == null) {
32-
$steamId = $this->steamId;
32+
$steamId = (array) $this->steamId;
3333
}
3434

35+
$steamId = implode(',', $steamId);
36+
3537
$chunks = array_chunk(explode(',', $steamId), 100);
3638

3739
$map = array_map([$this, 'getChunkedPlayerSummaries'], $chunks);
@@ -76,12 +78,12 @@ public function GetPlayerBans($steamId = null)
7678
$this->version = 'v1';
7779

7880
if ($steamId == null) {
79-
$steamId = $this->steamId;
81+
$steamId = (array) $this->steamId;
8082
}
8183

8284
// Set up the arguments
8385
$arguments = [
84-
'steamids' => $steamId
86+
'steamids' => implode(',', $steamId)
8587
];
8688

8789
// Get the client

0 commit comments

Comments
 (0)