Skip to content

Commit 78ed0c8

Browse files
committed
delete removeTrailingWhitespace function
1 parent a1679de commit 78ed0c8

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

resources/lib/UnitySite.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ public static function redirect($destination)
1414
}
1515
}
1616

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-
2817
public static function getGithubKeys($username)
2918
{
3019
$url = "https://api.github.com/users/$username/keys";

webroot/panel/account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
}
5252

5353
if (!empty($added_keys)) {
54-
$added_keys = UnitySite::removeTrailingWhitespace($added_keys);
54+
$added_keys = array_map(trim, $added_keys);
5555
$totalKeys = array_merge($USER->getSSHKeys(), $added_keys);
5656
$USER->setSSHKeys($totalKeys, $OPERATOR);
5757
}

0 commit comments

Comments
 (0)