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 e171f6f34e

Fixes FS#31867

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
canyonknight 2012-10-09 16:44:09 -04:00 committed by Lukas Fleischer
parent 24a8452880
commit f3325ce66f

View file

@ -428,7 +428,7 @@ function pkgname_is_blacklisted($name, $dbh=NULL) {
$result = $dbh->query($q); $result = $dbh->query($q);
if (!$result) return false; if (!$result) return false;
return ($result->fetch(PDO::FETCH_NUM) > 0); return ($result->fetchColumn() > 0);
} }
/** /**