Skip to content

Commit

Permalink
Merge pull request #1 from markscarbrough/LTS-mariadb-patch
Browse files Browse the repository at this point in the history
Fix SQL syntax error on MariaDB 10.2 (roundcube#5774), backported from 1.3 release to the 1.1 LTS release.
  • Loading branch information
markscarbrough authored Jul 3, 2019
2 parents fe0dc4e + 910030b commit cda14db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ private function _count()

// count contacts for this user
$sql_result = $this->db->query(
"SELECT COUNT(c.`contact_id`) AS rows".
"SELECT COUNT(c.`contact_id`) AS cnt".
" FROM " . $this->db->table_name($this->db_name, true) . " AS c".
$join.
" WHERE c.`del` <> 1".
Expand All @@ -494,7 +494,7 @@ private function _count()

$sql_arr = $this->db->fetch_assoc($sql_result);

$this->cache['count'] = (int) $sql_arr['rows'];
$this->cache['count'] = (int) $sql_arr['cnt'];

return $this->cache['count'];
}
Expand Down

0 comments on commit cda14db

Please sign in to comment.