diff options
Diffstat (limited to 'modules-available/news')
-rw-r--r-- | modules-available/news/page.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/news/page.inc.php b/modules-available/news/page.inc.php index 7a09d437..21b99952 100644 --- a/modules-available/news/page.inc.php +++ b/modules-available/news/page.inc.php @@ -122,7 +122,7 @@ class Page_News extends Page $res = Database::simpleQuery("SELECT newsid, dateline, expires, title, content FROM vmchooser_pages WHERE type = :type ORDER BY dateline DESC LIMIT 20", ['type' => $this->pageType]); $foundActive = false; - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { $row['dateline_s'] = Util::prettyTime($row['dateline']); $row['expires_s'] = $this->formatExpires($row['expires']); if ($row['newsid'] == $this->newsId) { |