From f3325ce66f004b7580229fc7ddafcf641cfc9aa8 Mon Sep 17 00:00:00 2001 From: canyonknight Date: Tue, 9 Oct 2012 16:44:09 -0400 Subject: 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 Signed-off-by: Lukas Fleischer --- web/lib/pkgfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 0072856..baa9aa1 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); } /** -- cgit v1.2.3-70-g09d2