Skip to content

Commit

Permalink
Fix returning query results.
Browse files Browse the repository at this point in the history
PDOStatement::execute() returns a boolean, the statement object
contains the results.
  • Loading branch information
mrubinsk committed Mar 11, 2014
1 parent e68bdd0 commit 37f30ca
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions app/lib/HordeWeb/Utils.php
Expand Up @@ -34,7 +34,10 @@ static public function getStableApps()
{
$stmt = self::getVersionDb()
->prepare('SELECT * FROM versions WHERE state = ?');
return $stmt->execute(array('stable'))->fetchAll();

if ($stmt->execute(array('stable'))) {
return $stmt->fetchAll();
}
}

/**
Expand All @@ -46,7 +49,10 @@ static public function getH4Apps()
{
$stmt = self::getVersionDb()
->prepare('SELECT * FROM versions WHERE pear = ?');
return $stmt->execute(array(true))->fetchAll();

if ($stmt->execute(array(true))) {
$stmt->fetchAll();
}
}

/**
Expand All @@ -58,14 +64,18 @@ static public function getH3Apps()
{
$stmt = self::getVersionDb()
->prepare('SELECT * FROM versions WHERE state = ?');
return $stmt->execute(array('three'))->fetchAll();
if ($stmt->execute(array('three'))) {
$stmt->fetchAll();
}
}

static public function getDevApps()
{
$stmt = self::getVersionDb()
->prepare('SELECT * FROM versions WHERE state = ?');
return $stmt->execute(array('dev'))->fetchAll();
if ($stmt->execute(array('dev'))) {
$stmt->fetchAll();
}
}

static public function downloadIcon($view, $app)
Expand Down

0 comments on commit 37f30ca

Please sign in to comment.