From: Andreas Fischer Date: Mon, 7 Oct 2013 23:33:22 +0000 (+0200) Subject: Do not pass PDO::FETCH_NUM (integer 3) as limit parameter to OC_DB::prepare(). X-Git-Tag: v5.0.13~50^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=36d77a07d5d7f73904856dd7a4b852f698fe1448;p=nextcloud-server.git Do not pass PDO::FETCH_NUM (integer 3) as limit parameter to OC_DB::prepare(). --- 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();