From 36d77a07d5d7f73904856dd7a4b852f698fe1448 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 8 Oct 2013 01:33:22 +0200 Subject: [PATCH] Do not pass PDO::FETCH_NUM (integer 3) as limit parameter to OC_DB::prepare(). --- lib/db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.php b/lib/db.php index 56fa1ce43e2..572cfd6d074 100644 --- a/lib/db.php +++ b/lib/db.php @@ -1183,7 +1183,7 @@ class PDOStatementWrapper{ public function numRows() { $regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i'; if (preg_match($regex, $this->statement->queryString, $output) > 0) { - $query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}", PDO::FETCH_NUM); + $query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}"); return $query->execute($this->lastArguments)->fetchColumn(); }else{ return $this->statement->rowCount(); -- 2.39.5