]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not pass PDO::FETCH_NUM (integer 3) as limit parameter to OC_DB::prepare().
authorAndreas Fischer <bantu@owncloud.com>
Mon, 7 Oct 2013 23:33:22 +0000 (01:33 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Mon, 7 Oct 2013 23:33:22 +0000 (01:33 +0200)
lib/db.php

index 56fa1ce43e2fae1cacbddc31f261dd1e61697d98..572cfd6d07439ff3430d9445a76c65c333b23602 100644 (file)
@@ -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();