We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1c4f66 commit 0d91a2aCopy full SHA for 0d91a2a
resources/lib/UnitySite.php
@@ -14,17 +14,6 @@ public static function redirect($destination)
14
}
15
16
17
- public static function removeTrailingWhitespace($arr)
18
- {
19
- $out = array();
20
- foreach ($arr as $str) {
21
- $new_string = rtrim($str);
22
- array_push($out, $new_string);
23
- }
24
-
25
- return $out;
26
27
28
public static function getGithubKeys($username)
29
{
30
$url = "https://api.github.com/users/$username/keys";
webroot/panel/account.php
@@ -51,7 +51,7 @@
51
52
53
if (!empty($added_keys)) {
54
- $added_keys = UnitySite::removeTrailingWhitespace($added_keys);
+ $added_keys = array_map(trim, $added_keys);
55
$totalKeys = array_merge($USER->getSSHKeys(), $added_keys);
56
$USER->setSSHKeys($totalKeys, $OPERATOR);
57
0 commit comments