diff --git a/includes/community.class.php b/includes/community.class.php index c12e180e..522d4b33 100644 --- a/includes/community.class.php +++ b/includes/community.class.php @@ -178,7 +178,7 @@ class CommunityContent } } - return $comments; + return array_values($comments); } public static function getCommentReplies(int $commentId, int $limit = 0, ?int &$nFound = 0) : array @@ -440,7 +440,7 @@ class CommunityContent unset($v['user']); } - return $videos; + return array_values($videos); } public static function getScreenshots(int $typeOrUser = 0, int $typeId = 0, int &$nFound = 0, bool $dateFmt = true) : array @@ -484,7 +484,7 @@ class CommunityContent unset($s['user']); } - return $screenshots; + return array_values($screenshots); } public static function getAll(int $type, int $typeId, array &$jsg) : array diff --git a/pages/utility.php b/pages/utility.php index 441ba989..acc1772a 100644 --- a/pages/utility.php +++ b/pages/utility.php @@ -95,7 +95,7 @@ class UtilityPage extends GenericPage else { array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date'])); - $this->lvTabs[] = ['commentpreview', ['data' => array_values($data)]]; + $this->lvTabs[] = ['commentpreview', ['data' => $data]]; } break; @@ -126,7 +126,7 @@ class UtilityPage extends GenericPage else { array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date'])); - $this->lvTabs[] = ['screenshot', ['data' => array_values($data)]]; + $this->lvTabs[] = ['screenshot', ['data' => $data]]; } break; @@ -157,7 +157,7 @@ class UtilityPage extends GenericPage else { array_walk($data, fn(&$d) => $d['date'] = date(Util::$dateFormatInternal, $d['date'])); - $this->lvTabs[] = ['video', ['data' => array_values($data)]]; + $this->lvTabs[] = ['video', ['data' => $data]]; } break;