Skip to content

Commit 313296f

Browse files
authored
chore: support additional tokens (DenverCoder1#259)
1 parent 3f20a1d commit 313296f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stats.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ function getGitHubTokens()
7373
}
7474
// find all tokens in environment variables
7575
$tokens = isset($_SERVER["TOKEN"]) ? [$_SERVER["TOKEN"]] : [];
76-
for ($i = 2; $i < 4; $i++) {
77-
if (isset($_SERVER["TOKEN$i"])) {
78-
// add token to list
79-
$tokens[] = $_SERVER["TOKEN$i"];
80-
}
76+
$index = 2;
77+
while (isset($_SERVER["TOKEN{$index}"])) {
78+
// add token to list
79+
$tokens[] = $_SERVER["TOKEN{$index}"];
80+
$index++;
8181
}
8282
// store for future use
8383
$GLOBALS["ALL_TOKENS"] = $tokens;

0 commit comments

Comments
 (0)