Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117882463
D5054.1775349280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5054.1775349280.diff
View Options
diff --git a/lib/kolab_sync_backend_state.php b/lib/kolab_sync_backend_state.php
--- a/lib/kolab_sync_backend_state.php
+++ b/lib/kolab_sync_backend_state.php
@@ -115,6 +115,10 @@
$select = $this->db->limitquery("SELECT * FROM `{$this->table_name}` WHERE " . implode(' AND ', $where)
. " ORDER BY `counter` DESC", 0, 1);
+ if ($err = $this->db->is_error($select)) {
+ throw new Exception("Query failed while fetching sync state: {$err}");
+ }
+
$state = $this->db->fetch_assoc($select);
if (empty($state)) {
@@ -164,6 +168,10 @@
$select = $this->db->query("SELECT * FROM `{$this->table_name}` WHERE " . implode(' AND ', $where));
+ if ($err = $this->db->is_error($select)) {
+ throw new Exception("Query failed while validating sync state: {$err}");
+ }
+
while ($row = $this->db->fetch_assoc($select)) {
$states[$row['counter']] = $this->get_object($row);
}
@@ -223,6 +231,9 @@
$where['counter'] = $this->db->quote_identifier('counter') . ' > ' . $this->db->quote($sync_key);
$select = $this->db->query("SELECT id FROM `{$this->table_name}` WHERE " . implode(' AND ', $where));
+ if ($err = $this->db->is_error($select)) {
+ throw new Exception("Query failed while checking for sync state: {$err}");
+ }
return $this->db->num_rows($select) > 0;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 5, 12:34 AM (15 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831721
Default Alt Text
D5054.1775349280.diff (1 KB)
Attached To
Mode
D5054: Error handling when querying sync-states
Attached
Detach File
Event Timeline