mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix warning with invalid time zone
The SQL query retrieving the time zone from the database may return an empty result set if the session timeout was reached. Handle such cases gracefully by leaving the timezone variable unset. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
1bedf736e8
commit
62341a3b34
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ function set_tz() {
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$timezone = $result->fetchColumn(0);
|
$timezone = $result->fetchColumn(0);
|
||||||
|
if (!$timezone) {
|
||||||
|
unset($timezone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_cookie = true;
|
$update_cookie = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue