From d0a14ffc05654a2a18109f5785b701a2f229bfb4 Mon Sep 17 00:00:00 2001 From: Mark Scarbrough Date: Sat, 10 Aug 2019 02:48:47 -0400 Subject: [PATCH] Fix SQL syntax error on MariaDB 10.2 (#5774) (#6833) Backported from 1.3 release to the 1.1 LTS release. --- program/lib/Roundcube/rcube_contacts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php index 3f2488b3c..5b755a80d 100644 --- a/program/lib/Roundcube/rcube_contacts.php +++ b/program/lib/Roundcube/rcube_contacts.php @@ -481,7 +481,7 @@ class rcube_contacts extends rcube_addressbook // 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". @@ -494,7 +494,7 @@ class rcube_contacts extends rcube_addressbook $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']; }