Skip to content

Commit

Permalink
fix PHP 8.3 strange bloat bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShockedPlot7560 committed Dec 11, 2023
1 parent 19890c2 commit e594447
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/players/util/SortedMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public function contains(string|int $key) : bool {
public function set(string|int $key, mixed $value, int $score) : void {
$this->entries[$key] = $value;
$this->key_scores[$key] = $score;
uksort($this->key_scores, fn (string $k1, string $k2) : int => $this->key_scores[$k1] <=> $this->key_scores[$k2]);
$scores = $this->key_scores;
uksort($scores, fn (string $k1, string $k2) : int => $this->key_scores[$k1] <=> $this->key_scores[$k2]);
$this->key_scores = $scores;
}

/**
Expand Down

0 comments on commit e594447

Please sign in to comment.