diff options
author | canyonknight <canyonknight@gmail.com> | 2012-10-09 22:44:09 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-10-11 21:19:16 +0200 |
commit | f3325ce66f004b7580229fc7ddafcf641cfc9aa8 (patch) | |
tree | 30f6e6b7dbefe0b29961fa9876fe8c5ecc01df56 /web/lib | |
parent | 24a8452880476201ab231b86f6a9cde1e74e107c (diff) | |
download | aur-f3325ce66f004b7580229fc7ddafcf641cfc9aa8.tar.gz aur-f3325ce66f004b7580229fc7ddafcf641cfc9aa8.tar.xz |
pkgfuncs.inc.php: Fix blacklisting functionality
An array that contains whether the package is blacklisted is
being improperly used for a comparison. Use fetchColumn() to
avoid the array completely and compare a value directly.
Regression with e171f6f34eeacf35cf7142b4788d43e7d0978546
Fixes FS#31867
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 00728564..baa9aa17 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -428,7 +428,7 @@ function pkgname_is_blacklisted($name, $dbh=NULL) { $result = $dbh->query($q); if (!$result) return false; - return ($result->fetch(PDO::FETCH_NUM) > 0); + return ($result->fetchColumn() > 0); } /** |