Probably going to break something but use {} instead of []
This commit is contained in:
@@ -28,7 +28,7 @@ $stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
$topPlayers = [];
|
||||
$topPlayers = new stdClass();
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$savedata = json_decode($row['save_data'], true);
|
||||
|
||||
@@ -11,7 +11,7 @@ $stmt = $conn->prepare("
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
$rows = [];
|
||||
$rows = new stdClass();
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$savedata = json_decode($row['save_data'], true);
|
||||
$icon = $savedata['bird']['icon'] ?? 1;
|
||||
|
||||
@@ -25,7 +25,7 @@ $stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
$topPlayers = [];
|
||||
$topPlayers = new stdClass();
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$savedata = json_decode($row['save_data'], true);
|
||||
|
||||
Reference in New Issue
Block a user