Skip to content

Commit

Permalink
fix: server status error if motd format contains string instead of array
Browse files Browse the repository at this point in the history
  • Loading branch information
samerton committed Apr 6, 2024
1 parent 9ce7b65 commit 1d7d7d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/classes/Minecraft/MCQuery.php
Expand Up @@ -377,6 +377,10 @@ private static function getMotd(string $text, array $modern_format): string

$motd = '';
foreach ($modern_format as $word) {
if (!is_array($word)) {
continue;
}

$motd .= self::COLOUR_CHAR . 'r';
if (isset($word['color'])) {
$motd .= self::getColor($word['color']);
Expand Down

0 comments on commit 1d7d7d0

Please sign in to comment.