summaryrefslogtreecommitdiffstats
path: root/web/lib/version.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-27 18:09:57 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-27 19:49:15 +0100
commitc557f348c42309fa761eaed0a7957d6b67cc0d74 (patch)
treefdd6231cf396fb7133bca9625c603d02ad620c3a /web/lib/version.inc.php
parent62341a3b3409befb0ca24e00e82a8a3c6a59def6 (diff)
downloadaur-c557f348c42309fa761eaed0a7957d6b67cc0d74.tar.gz
aur-c557f348c42309fa761eaed0a7957d6b67cc0d74.tar.xz
Fix SQL query to retrieve language setting
In commit e171f6f (Migrate all DB code to use PDO, 2012-08-08), PDOStatement::fetchAll() was introduced as a drop-in replacement for mysql_fetch_array(). However, PDOStatement::fetchAll() returns a list of all results while mysql_fetch_array() returns a single result only. Instead of adding the missing indirection, simplify the code by using PDO::fetchColumn(). Also add some safeguards to prevent warnings if the result set returned by the query is empty. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib/version.inc.php')
0 files changed, 0 insertions, 0 deletions