Skip to content

Commit 8d354c8

Browse files
committed
Remove obsolete code
1 parent a47eea3 commit 8d354c8

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

wcfsetup/install/files/lib/system/cache/tolerant/UserBirthdayCache.class.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
*/
1616
final class UserBirthdayCache extends AbstractTolerantCache
1717
{
18-
public function __construct(public readonly int $month)
19-
{
20-
}
18+
public function __construct(public readonly int $month) {}
2119

2220
#[\Override]
2321
public function getLifetime(): int
@@ -42,10 +40,7 @@ protected function rebuildCacheData(): array
4240
$statement = WCF::getDB()->prepare($sql);
4341
$statement->execute(['%-' . ($this->month < 10 ? '0' : '') . $this->month . '-%']);
4442
while ($row = $statement->fetchArray()) {
45-
[, , $day] = \explode('-', $row[$birthday]);
46-
if (!isset($data[$day])) {
47-
$data[$day] = [];
48-
}
43+
[,, $day] = \explode('-', $row[$birthday]);
4944
$data[\intval($day)][] = $row['userID'];
5045
}
5146

0 commit comments

Comments
 (0)