Commit eccd328d authored by nodivbyzero's avatar nodivbyzero Committed by Lukas Fleischer
Browse files

Handle empty resultset getting recent 10 packages



Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 3d906231
......@@ -19,10 +19,12 @@ function updates_table() {
$result = $dbh->query($q);
$newest_packages = new ArrayObject();
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$newest_packages->append($row);
if ($result) {
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$newest_packages->append($row);
}
set_cache_value($key, $newest_packages);
}
set_cache_value($key, $newest_packages);
}
include('stats/updates_table.php');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment