mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Handle empty resultset getting recent 10 packages
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
3d90623154
commit
eccd328d42
1 changed files with 5 additions and 3 deletions
|
@ -19,10 +19,12 @@ function updates_table() {
|
||||||
$result = $dbh->query($q);
|
$result = $dbh->query($q);
|
||||||
|
|
||||||
$newest_packages = new ArrayObject();
|
$newest_packages = new ArrayObject();
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
if ($result) {
|
||||||
$newest_packages->append($row);
|
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');
|
include('stats/updates_table.php');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue